Hi,

Some usb drivers don't appear to need malloc().
I recently found this for umidi_quirks.c and decided to look further.
The patch was built on i386.

- Michael


Index: if_urtw.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_urtw.c,v
retrieving revision 1.62
diff -u -p -u -r1.62 if_urtw.c
--- if_urtw.c   13 Apr 2016 11:03:37 -0000      1.62
+++ if_urtw.c   9 Jan 2017 04:38:49 -0000
@@ -25,7 +25,6 @@
 #include <sys/kernel.h>
 #include <sys/socket.h>
 #include <sys/systm.h>
-#include <sys/malloc.h>
 #include <sys/timeout.h>
 #include <sys/conf.h>
 #include <sys/device.h>
Index: ugold.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ugold.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 ugold.c
--- ugold.c     9 Jan 2016 04:14:42 -0000       1.12
+++ ugold.c     9 Jan 2017 04:38:54 -0000
@@ -26,7 +26,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
 #include <sys/device.h>
 #include <sys/sensors.h>
 
Index: umass.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/umass.c,v
retrieving revision 1.73
diff -u -p -u -r1.73 umass.c
--- umass.c     3 Aug 2016 13:44:49 -0000       1.73
+++ umass.c     9 Jan 2017 04:39:14 -0000
@@ -130,7 +130,6 @@
 #include <sys/conf.h>
 #include <sys/buf.h>
 #include <sys/device.h>
-#include <sys/malloc.h>
 #include <sys/timeout.h>
 #undef KASSERT
 #define KASSERT(cond, msg)
Index: uoak_subr.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uoak_subr.c,v
retrieving revision 1.7
diff -u -p -u -r1.7 uoak_subr.c
--- uoak_subr.c 25 May 2015 12:53:12 -0000      1.7
+++ uoak_subr.c 9 Jan 2017 04:39:14 -0000
@@ -22,7 +22,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
 #include <sys/device.h>
 #include <sys/conf.h>
 #include <sys/sensors.h>
Index: usbdi_util.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/usbdi_util.c,v
retrieving revision 1.41
diff -u -p -u -r1.41 usbdi_util.c
--- usbdi_util.c        14 Mar 2015 03:38:50 -0000      1.41
+++ usbdi_util.c        9 Jan 2017 04:39:14 -0000
@@ -35,7 +35,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
 #include <sys/device.h>
 
 #include <machine/bus.h>
Index: uthum.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uthum.c,v
retrieving revision 1.31
diff -u -p -u -r1.31 uthum.c
--- uthum.c     19 Mar 2016 11:34:22 -0000      1.31
+++ uthum.c     9 Jan 2017 04:39:19 -0000
@@ -21,7 +21,6 @@
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
-#include <sys/malloc.h>
 #include <sys/device.h>
 #include <sys/conf.h>
 #include <sys/sensors.h>

Reply via email to