diff options
author | markm <markm@FreeBSD.org> | 2003-02-27 18:07:11 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2003-02-27 18:07:11 +0000 |
commit | fe3c734ec84e476204bb6c45f4d74149a8c465dc (patch) | |
tree | dbb0e89273caaf8e11cdae83458c346810393b69 /sys/dev/null | |
parent | 5736aa9039e290655a2484d65e3da9ab4033863d (diff) | |
download | FreeBSD-src-fe3c734ec84e476204bb6c45f4d74149a8c465dc.zip FreeBSD-src-fe3c734ec84e476204bb6c45f4d74149a8c465dc.tar.gz |
Warns and lint fix. Nearly all trivial stuff.
Diffstat (limited to 'sys/dev/null')
-rw-r--r-- | sys/dev/null/null.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 908e533..6bdce78 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -36,8 +36,6 @@ #include <sys/disk.h> #include <sys/bus.h> #include <machine/bus.h> -#include <machine/resource.h> -#include <sys/rman.h> /* For use with destroy_dev(9). */ static dev_t null_dev; @@ -87,8 +85,9 @@ static struct cdevsw zero_cdevsw = { static void *zbuf; +/* ARGSUSED */ static int -null_write(dev_t dev, struct uio *uio, int flags) +null_write(dev_t dev __unused, struct uio *uio, int flags __unused) { uio->uio_resid = 0; return 0; @@ -107,21 +106,23 @@ null_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td) return (set_dumper(NULL)); } +/* ARGSUSED */ static int -zero_read(dev_t dev, struct uio *uio, int flags) +zero_read(dev_t dev __unused, struct uio *uio, int flags __unused) { - u_int c; + int c; int error = 0; while (uio->uio_resid > 0 && error == 0) { - c = min(uio->uio_resid, PAGE_SIZE); + c = uio->uio_resid < PAGE_SIZE ? uio->uio_resid : PAGE_SIZE; error = uiomove(zbuf, c, uio); } return error; } +/* ARGSUSED */ static int -null_modevent(module_t mod, int type, void *data) +null_modevent(module_t mod __unused, int type, void *data __unused) { switch(type) { case MOD_LOAD: |