diff options
author | 2010-11-18 21:15:13 +0000 | |
---|---|---|
committer | 2010-11-18 21:15:13 +0000 | |
commit | bc78e6577d23f89fbc930e978910cfbad5de0bb8 (patch) | |
tree | d1b8af216a7a90d4ba9f627c331264bdc7fac04d | |
parent | Do not #include <sys/dkstat.h> if you don't need anything from it. (diff) | |
download | wireguard-openbsd-bc78e6577d23f89fbc930e978910cfbad5de0bb8.tar.xz wireguard-openbsd-bc78e6577d23f89fbc930e978910cfbad5de0bb8.zip |
Don't
#include "foo.h"
#if NFOO > 0
(whole file)
#endif
since config(8) file inclusion rules already do it for you.
ok deraadt@
-rw-r--r-- | sys/arch/amd64/amd64/acpi_wakecode.S | 9 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_wakecode.S | 7 | ||||
-rw-r--r-- | sys/arch/vax/uba/qv.c | 7 | ||||
-rw-r--r-- | sys/dev/audio.c | 13 | ||||
-rw-r--r-- | sys/dev/eisa/ahc_eisa.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/cy.c | 8 | ||||
-rw-r--r-- | sys/dev/midi.c | 5 | ||||
-rw-r--r-- | sys/dev/sequencer.c | 8 |
8 files changed, 10 insertions, 55 deletions
diff --git a/sys/arch/amd64/amd64/acpi_wakecode.S b/sys/arch/amd64/amd64/acpi_wakecode.S index 1da84748101..d81619850f7 100644 --- a/sys/arch/amd64/amd64/acpi_wakecode.S +++ b/sys/arch/amd64/amd64/acpi_wakecode.S @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_wakecode.S,v 1.11 2010/07/01 01:02:31 pirofti Exp $ */ +/* $OpenBSD: acpi_wakecode.S,v 1.12 2010/11/18 21:15:13 miod Exp $ */ /* * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org> * Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org> @@ -41,11 +41,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "acpi.h" - -#if NACPI > 0 -#ifndef SMALL_KERNEL - #define _ACPI_WAKECODE #include "assym.h" @@ -630,5 +625,3 @@ NENTRY(acpi_savecpu) movl $1, %eax ret -#endif /* SMALL_KERNEL */ -#endif /* NACPI > 0 */ diff --git a/sys/arch/i386/i386/acpi_wakecode.S b/sys/arch/i386/i386/acpi_wakecode.S index 54050a31d90..6c810cf180a 100644 --- a/sys/arch/i386/i386/acpi_wakecode.S +++ b/sys/arch/i386/i386/acpi_wakecode.S @@ -40,11 +40,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include "acpi.h" - -#if NACPI > 0 -#ifndef SMALL_KERNEL - #define _ACPI_WAKECODE #include "assym.h" @@ -480,5 +475,3 @@ NENTRY(acpi_savecpu) movl $1, %eax ret -#endif /* SMALL_KERNEL */ -#endif /* NACPI > 0 */ diff --git a/sys/arch/vax/uba/qv.c b/sys/arch/vax/uba/qv.c index ff4654e361b..2623391d822 100644 --- a/sys/arch/vax/uba/qv.c +++ b/sys/arch/vax/uba/qv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qv.c,v 1.15 2010/06/26 23:24:44 guenther Exp $ */ +/* $OpenBSD: qv.c,v 1.16 2010/11/18 21:15:14 miod Exp $ */ /* $NetBSD: qv.c,v 1.2 1996/09/02 06:44:28 mycroft Exp $ */ /*- @@ -124,9 +124,6 @@ */ -#include "qv.h" -#if NQV > 0 - #include <machine/pte.h> #include <sys/param.h> @@ -152,7 +149,6 @@ struct uba_device *qvinfo[NQV]; struct tty qv_tty[NQV*4]; -#define nNQV NQV int nqv = NQV*4; /* @@ -1312,4 +1308,3 @@ int probed; qvaddr->qv_csr |= QV_VIDEO_ENA ; return 1; } -#endif diff --git a/sys/dev/audio.c b/sys/dev/audio.c index a6eed371916..d671ec4cfe0 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.110 2010/09/21 20:08:11 jakemsr Exp $ */ +/* $OpenBSD: audio.c,v 1.111 2010/11/18 21:15:14 miod Exp $ */ /* $NetBSD: audio.c,v 1.119 1999/11/09 16:50:47 augustss Exp $ */ /* @@ -61,9 +61,6 @@ * and silence fill. */ -#include "audio.h" -#if NAUDIO > 0 - #include <sys/param.h> #include <sys/ioctl.h> #include <sys/fcntl.h> @@ -536,7 +533,6 @@ audio_attach_mi(struct audio_hw_if *ahwp, void *hdlp, struct device *dev) return config_found(dev, &arg, audioprint); } -#if NAUDIO > 0 int audioprint(void *aux, const char *pnp) { @@ -562,8 +558,6 @@ audioprint(void *aux, const char *pnp) return (UNCONF); } -#endif /* NAUDIO > 0 */ - #ifdef AUDIO_DEBUG void audio_printsc(struct audio_softc *); void audio_print_params(char *, struct audio_params *); @@ -3296,7 +3290,6 @@ mixer_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) IOCPARM_LEN(cmd), IOCGROUP(cmd), cmd&0xff, error)); return (error); } -#endif int audiokqfilter(dev_t dev, struct knote *kn) @@ -3363,7 +3356,7 @@ filt_audiowrite(struct knote *kn, long hint) return AUDIO_FILTWRITE(sc); } -#if NAUDIO > 0 && NWSKBD > 0 +#if NWSKBD > 0 int wskbd_set_mixervolume(long dir) { @@ -3429,4 +3422,4 @@ wskbd_set_mixervolume(long dir) return (0); } -#endif /* NAUDIO > 0 && NWSKBD > 0 */ +#endif /* NWSKBD > 0 */ diff --git a/sys/dev/eisa/ahc_eisa.c b/sys/dev/eisa/ahc_eisa.c index 0226d074a89..393954d723a 100644 --- a/sys/dev/eisa/ahc_eisa.c +++ b/sys/dev/eisa/ahc_eisa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ahc_eisa.c,v 1.19 2009/03/29 21:53:52 sthen Exp $ */ +/* $OpenBSD: ahc_eisa.c,v 1.20 2010/11/18 21:15:15 miod Exp $ */ /* $NetBSD: ahc_eisa.c,v 1.10 1996/10/21 22:30:58 thorpej Exp $ */ /* @@ -32,12 +32,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_eisa.c,v 1.19 2009/03/29 21:53:52 sthen Exp $ + * $Id: ahc_eisa.c,v 1.20 2010/11/18 21:15:15 miod Exp $ */ -#include "eisa.h" -#if NEISA > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -327,4 +324,3 @@ void *aux; ahc_attach(ahc); } -#endif /* NEISA > 0 */ diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index afc7bef9c5c..8a2cf8712e7 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.32 2010/07/02 17:27:01 nicm Exp $ */ +/* $OpenBSD: cy.c,v 1.33 2010/11/18 21:15:15 miod Exp $ */ /* * Copyright (c) 1996 Timo Rossi. * All rights reserved. @@ -50,10 +50,6 @@ * */ -/* NCY is the number of Cyclom cards in the machine */ -#include "cy.h" -#if NCY > 0 - #include <sys/types.h> #include <sys/param.h> #include <sys/ioctl.h> @@ -1418,5 +1414,3 @@ cy_speed(speed_t speed, int *cor, int *bpr, int cy_clock) return (-1); } - -#endif /* NCY > 0 */ diff --git a/sys/dev/midi.c b/sys/dev/midi.c index a6032faa670..fb909465f5d 100644 --- a/sys/dev/midi.c +++ b/sys/dev/midi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: midi.c,v 1.22 2010/04/08 01:48:24 fgsch Exp $ */ +/* $OpenBSD: midi.c,v 1.23 2010/11/18 21:15:14 miod Exp $ */ /* * Copyright (c) 2003, 2004 Alexandre Ratchov @@ -24,9 +24,7 @@ * need this driver */ -#include "midi.h" #include "sequencer.h" -#if NMIDI > 0 #include <sys/param.h> #include <sys/fcntl.h> @@ -759,4 +757,3 @@ midi_writebytes(int unit, unsigned char *mesg, int mesglen) } #endif /* NSEQUENCER > 0 */ -#endif /* NMIDI > 0 */ diff --git a/sys/dev/sequencer.c b/sys/dev/sequencer.c index 98bfe88c565..d1756d4c991 100644 --- a/sys/dev/sequencer.c +++ b/sys/dev/sequencer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sequencer.c,v 1.19 2009/11/09 17:53:39 nicm Exp $ */ +/* $OpenBSD: sequencer.c,v 1.20 2010/11/18 21:15:14 miod Exp $ */ /* $NetBSD: sequencer.c,v 1.13 1998/11/25 22:17:07 augustss Exp $ */ /* @@ -30,9 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "sequencer.h" -#if NSEQUENCER > 0 - #include <sys/param.h> #include <sys/ioctl.h> #include <sys/fcntl.h> @@ -1283,6 +1280,3 @@ midi_writebytes(int unit, u_char *buf, int cc) return (ENXIO); } #endif /* NMIDI == 0 */ - -#endif /* NSEQUENCER > 0 */ - |