Module Name:    src
Committed By:   riastradh
Date:           Sat Dec 17 03:46:52 UTC 2016

Modified Files:
        src/sys/arch/hpcmips/dev: ucbsnd.c
        src/sys/sys: conf.h
        src/sys/uvm: uvm_device.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/hpcmips/dev/ucbsnd.c
cvs rdiff -u -r1.150 -r1.151 src/sys/sys/conf.h
cvs rdiff -u -r1.64 -r1.65 src/sys/uvm/uvm_device.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hpcmips/dev/ucbsnd.c
diff -u src/sys/arch/hpcmips/dev/ucbsnd.c:1.24 src/sys/arch/hpcmips/dev/ucbsnd.c:1.25
--- src/sys/arch/hpcmips/dev/ucbsnd.c:1.24	Fri Jun 26 22:16:27 2015
+++ src/sys/arch/hpcmips/dev/ucbsnd.c	Sat Dec 17 03:46:52 2016
@@ -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 @@ const struct cdevsw ucbsnd_cdevsw = {
 	.d_stop = nostop,
 	.d_tty = notty,
 	.d_poll = nopoll,
-	.d_mmap = nullmmap,
+	.d_mmap = nommap,
 	.d_kqfilter = nokqfilter,
 	.d_discard = nodiscard,
 	.d_flag = 0

Index: src/sys/sys/conf.h
diff -u src/sys/sys/conf.h:1.150 src/sys/sys/conf.h:1.151
--- src/sys/sys/conf.h:1.150	Fri Dec 16 23:35:04 2016
+++ src/sys/sys/conf.h	Sat Dec 17 03:46:52 2016
@@ -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 @@ paddr_t	nommap(dev_t, off_t, int);
 #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)

Index: src/sys/uvm/uvm_device.c
diff -u src/sys/uvm/uvm_device.c:1.64 src/sys/uvm/uvm_device.c:1.65
--- src/sys/uvm/uvm_device.c:1.64	Sun Dec 14 23:48:58 2014
+++ src/sys/uvm/uvm_device.c	Sat Dec 17 03:46:52 2016
@@ -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 @@ udv_attach(dev_t device, vm_prot_t acces
 		return (NULL);
 	}
 	mapfn = cdev->d_mmap;
-	if (mapfn == NULL || mapfn == nommap || mapfn == nullmmap) {
+	if (mapfn == NULL || mapfn == nommap) {
 		return(NULL);
 	}
 

Reply via email to