Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Omit needless nullmmap.



details:   https://anonhg.NetBSD.org/src/rev/831910918e6b
branches:  trunk
changeset: 819781:831910918e6b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Dec 17 03:46:52 2016 +0000

description:
Omit needless nullmmap.

Convert the one user of it to nommap.  No functional change to the
device driver, since uvm interpreted nullmmap just like nommap.

This slightly changes the uvm ABI so that the function pointer nullop
is no longer interpreted as non-mmappable.  I do hereby declare that
I am surfing the kernel version bump from a few hours ago.

diffstat:

 sys/arch/hpcmips/dev/ucbsnd.c |  6 +++---
 sys/sys/conf.h                |  3 +--
 sys/uvm/uvm_device.c          |  6 +++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diffs (71 lines):

diff -r 560310f132aa -r 831910918e6b sys/arch/hpcmips/dev/ucbsnd.c
--- a/sys/arch/hpcmips/dev/ucbsnd.c     Sat Dec 17 03:43:38 2016 +0000
+++ b/sys/arch/hpcmips/dev/ucbsnd.c     Sat Dec 17 03:46:52 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ucbsnd.c,v 1.24 2015/06/26 22:16:27 matt Exp $ */
+/*     $NetBSD: ucbsnd.c,v 1.25 2016/12/17 03:46:52 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucbsnd.c,v 1.24 2015/06/26 22:16:27 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucbsnd.c,v 1.25 2016/12/17 03:46:52 riastradh Exp $");
 
 #include "opt_use_poll.h"
 
@@ -184,7 +184,7 @@
        .d_stop = nostop,
        .d_tty = notty,
        .d_poll = nopoll,
-       .d_mmap = nullmmap,
+       .d_mmap = nommap,
        .d_kqfilter = nokqfilter,
        .d_discard = nodiscard,
        .d_flag = 0
diff -r 560310f132aa -r 831910918e6b sys/sys/conf.h
--- a/sys/sys/conf.h    Sat Dec 17 03:43:38 2016 +0000
+++ b/sys/sys/conf.h    Sat Dec 17 03:46:52 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: conf.h,v 1.150 2016/12/16 23:35:04 riastradh Exp $     */
+/*     $NetBSD: conf.h,v 1.151 2016/12/17 03:46:52 riastradh Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -147,7 +147,6 @@
 #define        nullioctl       ((dev_type_ioctl((*)))nullop)
 #define        nullstop        ((dev_type_stop((*)))nullop)
 #define        nullpoll        ((dev_type_poll((*)))nullop)
-#define        nullmmap        ((dev_type_mmap((*)))nullop)
 #define        nulldump        ((dev_type_dump((*)))nullop)
 #define        nullkqfilter    ((dev_type_kqfilter((*)))eopnotsupp)
 #define nulldiscard    ((dev_type_discard((*)))nullop)
diff -r 560310f132aa -r 831910918e6b sys/uvm/uvm_device.c
--- a/sys/uvm/uvm_device.c      Sat Dec 17 03:43:38 2016 +0000
+++ b/sys/uvm/uvm_device.c      Sat Dec 17 03:46:52 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_device.c,v 1.64 2014/12/14 23:48:58 chs Exp $      */
+/*     $NetBSD: uvm_device.c,v 1.65 2016/12/17 03:46:52 riastradh Exp $        */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.64 2014/12/14 23:48:58 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_device.c,v 1.65 2016/12/17 03:46:52 riastradh Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -127,7 +127,7 @@
                return (NULL);
        }
        mapfn = cdev->d_mmap;
-       if (mapfn == NULL || mapfn == nommap || mapfn == nullmmap) {
+       if (mapfn == NULL || mapfn == nommap) {
                return(NULL);
        }
 



Home | Main Index | Thread Index | Old Index