]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove unit2minor() use from kernel code.
authored <ed@FreeBSD.org>
Fri, 26 Sep 2008 14:19:52 +0000 (14:19 +0000)
committered <ed@FreeBSD.org>
Fri, 26 Sep 2008 14:19:52 +0000 (14:19 +0000)
commit4212d51a7da942b0c717c9965552c9549d90de08
treef45f750affeffb39e162226343b0db9a110c42ce
parent0a873f95fe4b1e8d5d3f6ead357fca828948b3ac
Remove unit2minor() use from kernel code.

When I changed kern_conf.c three months ago I made device unit numbers
equal to (unneeded) device minor numbers. We used to require
bitshifting, because there were eight bits in the middle that were
reserved for a device major number. Not very long after I turned
dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
The unit2minor() and minor2unit() macro's were no-ops.

We'd better not remove these four macro's from the kernel, because there
is a lot of (external) code that may still depend on them. For now it's
harmless to remove all invocations of unit2minor() and minor2unit().

Reviewed by: kib
20 files changed:
sys/cam/scsi/scsi_pass.c
sys/cam/scsi/scsi_ses.c
sys/cam/scsi/scsi_sg.c
sys/cam/scsi/scsi_target.c
sys/cddl/dev/dtrace/dtrace_clone.c
sys/dev/led/led.c
sys/dev/sound/pci/emu10kx.c
sys/dev/sound/pcm/dsp.c
sys/dev/sound/pcm/mixer.c
sys/dev/vkbd/vkbd.c
sys/fs/coda/coda_fbsd.c
sys/geom/geom_dev.c
sys/i386/acpica/acpi_machdep.c
sys/kern/kern_conf.c
sys/net/if.c
sys/net/if_tap.c
sys/net/if_tun.c
sys/netgraph/ng_device.c
sys/netsmb/smb_dev.c
sys/security/audit/audit_pipe.c