diff options
author | Mark Murray <markm@FreeBSD.org> | 2003-02-27 18:07:11 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2003-02-27 18:07:11 +0000 |
commit | ef8b020c73f1b64a89302d1f8fd2e3443449f28a (patch) | |
tree | dbb0e89273caaf8e11cdae83458c346810393b69 /sys/dev/null | |
parent | 7503d74f543fde9e10e8a20c9c99da2f98b50545 (diff) | |
download | src-ef8b020c73f1b64a89302d1f8fd2e3443449f28a.tar.gz src-ef8b020c73f1b64a89302d1f8fd2e3443449f28a.zip |
Warns and lint fix. Nearly all trivial stuff.
Notes
Notes:
svn path=/head/; revision=111630
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 908e533a9287..6bdce78131ba 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: |