Permalink
Browse files

kernel: Fix -Wundef in a number of places.

  • Loading branch information...
Sascha Wildner
Sascha Wildner committed Mar 18, 2011
1 parent dbb534a commit 122df98f46771804838bddd18f95c6070fac23cf
View
@@ -26,7 +26,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/isa/vga_isa.c,v 1.17 2000/01/29 15:08:56 peter Exp $
- * $DragonFly: src/sys/bus/isa/vga_isa.c,v 1.14 2008/03/20 21:25:30 swildner Exp $
*/
#include "opt_vga.h"
@@ -166,7 +165,7 @@ isavga_attach(device_t dev)
if (bootverbose)
(*vidsw[sc->adp->va_index]->diag)(sc->adp, bootverbose);
-#if experimental
+#if 0 /* experimental */
device_add_child(dev, "fb", -1);
bus_generic_attach(dev);
#endif
View
@@ -3122,7 +3122,7 @@ acpiioctl(struct dev_ioctl_args *ap)
break;
case ACPIIO_ACKSLPSTATE:
error = EOPNOTSUPP;
-#if notyet
+#if 0 /* notyet */
error = *(int *)ap->a_data;
error = acpi_AckSleepState(sc->acpi_clone, error);
#endif
@@ -29,7 +29,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/advansys/advlib.c,v 1.15.2.1 2000/04/14 13:32:49 nyan Exp $
- * $DragonFly: src/sys/dev/disk/advansys/advlib.c,v 1.10 2008/02/10 00:01:02 pavalos Exp $
*/
/*
* Ported from:
@@ -238,7 +237,7 @@ static void adv_toggle_irq_act(struct adv_softc *adv);
/* Chip Control */
static int adv_host_req_chip_halt(struct adv_softc *adv);
static void adv_set_chip_ih(struct adv_softc *adv, u_int16_t ins_code);
-#if UNUSED
+#if 0 /* UNUSED */
static u_int8_t adv_get_chip_scsi_ctrl(struct adv_softc *adv);
#endif
@@ -1616,7 +1615,7 @@ adv_set_chip_ih(struct adv_softc *adv, u_int16_t ins_code)
adv_set_bank(adv, 0);
}
-#if UNUSED
+#if 0 /* UNUSED */
static u_int8_t
adv_get_chip_scsi_ctrl(struct adv_softc *adv)
{
@@ -33,7 +33,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/advansys/adw_pci.c,v 1.12.2.1 2000/08/02 22:22:40 peter Exp $
- * $DragonFly: src/sys/dev/disk/advansys/adw_pci.c,v 1.5 2006/12/22 23:26:15 swildner Exp $
*/
#include <sys/param.h>
@@ -101,7 +100,7 @@ struct adw_pci_identity adw_pci_ident_table[] =
&adw_asc38C0800_mcode_data,
&adw_asc38C0800_default_eeprom
},
-#if NOTYET
+#if 0 /* NOTYET */
/* XXX Disabled until I have hardware to test with */
/* asc38C1600 based controllers */
{
@@ -31,7 +31,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/advansys/adwcam.c,v 1.7.2.2 2001/03/05 13:08:55 obrien Exp $
- * $DragonFly: src/sys/dev/disk/advansys/adwcam.c,v 1.19 2008/05/18 20:30:20 pavalos Exp $
*/
/*
* Ported from:
@@ -1241,7 +1240,7 @@ adw_intr(void *arg)
* Handle RDMA failure by resetting the
* SCSI Bus and chip.
*/
-#if XXX
+#if 0 /* XXX */
AdvResetChipAndSB(adv_dvc_varp);
#endif
break;
@@ -167,7 +167,7 @@ atkbdc_configure(void)
tag = 0; /* XXX */
#endif
-#if notyet
+#if 0 /* notyet */
bus_space_map(tag, port0, IO_KBDSIZE, 0, &h0);
bus_space_map(tag, port1, IO_KBDSIZE, 0, &h1);
#else
@@ -25,7 +25,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/syscons/scterm-sc.c,v 1.4.2.10 2001/06/11 09:05:39 phk Exp $
- * $DragonFly: src/sys/dev/misc/syscons/scterm-sc.c,v 1.8 2008/08/10 19:47:31 swildner Exp $
*/
#include "opt_syscons.h"
@@ -209,7 +208,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
sc_term_up_scroll(scp, 1, sc->scr_map[0x20],
tcp->cur_attr, 0, 0);
break;
-#if notyet
+#if 0 /* notyet */
case 'Q':
tcp->esc = 4;
return;
@@ -614,7 +613,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
}
break;
}
-#if notyet
+#if 0 /* notyet */
} else if (tcp->esc == 4) { /* seen ESC Q */
/* to be filled */
#endif
@@ -579,7 +579,7 @@ scclose(struct dev_close_args *ap)
if (finish_vt_acq(scp) == 0) /* force acknowledge */
DPRINTF(5, ("reset WAIT_ACQ, "));
syscons_lock();
-#if not_yet_done
+#if 0 /* notyet */
if (scp == &main_console) {
scp->pid = 0;
scp->proc = NULL;
@@ -254,7 +254,7 @@ smioctl(struct dev_ioctl_args *ap)
lwkt_reltoken(&tty_token);
return 0;
-#if notyet
+#if 0 /* notyet */
case MOUSE_GETVARS: /* get internal mouse variables */
case MOUSE_SETVARS: /* set internal mouse variables */
lwkt_reltoken(&tty_token);
View
@@ -116,7 +116,7 @@ Byte_t rp_sBitMapSetTbl[8] =
};
/* Actually not used */
-#if notdef
+#if 0 /* notdef */
struct termios deftermios = {
TTYDEF_IFLAG,
TTYDEF_OFLAG,
@@ -906,7 +906,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports)
rp->rp_intmask = RXF_TRIG | TXFIFO_MT | SRC_INT |
DELTA_CD | DELTA_CTS | DELTA_DSR;
-#if notdef
+#if 0 /* notdef */
ChanStatus = sGetChanStatus(&rp->rp_channel);
#endif /* notdef */
if(sInitChan(ctlp, &rp->rp_channel, aiop, chan) == 0) {
@@ -33,7 +33,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/rp/rp_isa.c,v 1.3.2.1 2002/06/18 03:11:46 obrien Exp $
- * $DragonFly: src/sys/dev/serial/rp/rp_isa.c,v 1.7 2006/10/25 20:56:02 dillon Exp $
*/
#include <sys/param.h>
@@ -231,7 +230,7 @@ rp_attach(device_t dev)
ctlp = device_get_softc(dev);
-#if notdef
+#if 0 /* notdef */
num_aiops = sInitController(ctlp,
rp_controller,
MAX_AIOPS_PER_BOARD, 0,
@@ -33,7 +33,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/rp/rp_pci.c,v 1.3.2.1 2002/06/18 03:11:46 obrien Exp $
- * $DragonFly: src/sys/dev/serial/rp/rp_pci.c,v 1.8 2006/10/25 20:56:02 dillon Exp $
*/
#include <sys/param.h>
@@ -89,7 +88,7 @@ static devclass_t rp_devclass;
static int rp_pciprobe(device_t dev);
static int rp_pciattach(device_t dev);
-#if notdef
+#if 0 /* notdef */
static int rp_pcidetach(device_t dev);
static int rp_pcishutdown(device_t dev);
#endif /* notdef */
@@ -190,7 +189,7 @@ rp_pciattach(device_t dev)
return (retval);
}
-#if notdef
+#if 0 /* notdef */
static int
rp_pcidetach(device_t dev)
{
@@ -279,7 +278,7 @@ sPCIInitController( CONTROLLER_t *CtlP,
CtlP->AiopNumChan[i] = 8;
break;
default:
-#if notdef
+#if 0 /* notdef */
CtlP->AiopNumChan[i] = 8;
#else
CtlP->AiopNumChan[i] = sReadAiopNumChan(CtlP, i);
@@ -333,7 +332,7 @@ static device_method_t rp_pcimethods[] = {
/* Device interface */
DEVMETHOD(device_probe, rp_pciprobe),
DEVMETHOD(device_attach, rp_pciattach),
-#if notdef
+#if 0 /* notdef */
DEVMETHOD(device_detach, rp_pcidetach),
DEVMETHOD(device_shutdown, rp_pcishutdown),
#endif /* notdef */
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/dev/rp/rpvar.h,v 1.5.2.1 2002/06/18 03:11:46 obrien Exp $
- * $DragonFly: src/sys/dev/serial/rp/rpvar.h,v 1.3 2004/12/03 17:59:20 joerg Exp $
*/
/*
@@ -84,6 +83,6 @@ struct rp_port {
};
/* Actually not used */
-#if notdef
+#if 0 /* notdef */
extern struct termios deftermios;
#endif /* notdef */
@@ -25,7 +25,6 @@
*
* $NetBSD: usb/uvscom.c,v 1.1 2002/03/19 15:08:42 augustss Exp $
* $FreeBSD: src/sys/dev/usb/uvscom.c,v 1.19 2003/11/16 12:26:10 akiyama Exp $
- * $DragonFly: src/sys/dev/usbmisc/uvscom/uvscom.c,v 1.20 2008/01/16 12:24:31 matthias Exp $
*/
/*
@@ -178,7 +177,7 @@ static void uvscom_break(struct uvscom_softc *, int);
static void uvscom_set(void *, int, int, int);
static void uvscom_intr(usbd_xfer_handle, usbd_private_handle, usbd_status);
-#if TODO
+#if 0 /* TODO */
static int uvscom_ioctl(void *, int, u_long, caddr_t, int, struct thread *);
#endif
static int uvscom_param(void *, int, struct termios *);
@@ -836,7 +835,7 @@ uvscom_get_status(void *addr, int portno, u_char *lsr, u_char *msr)
*msr = sc->sc_msr;
}
-#if TODO
+#if 0 /* TODO */
static int
uvscom_ioctl(void *addr, int portno, u_long cmd, caddr_t data, int flag,
struct thread *p)
View
@@ -316,7 +316,7 @@ vid_configure(int flags)
#ifdef FB_INSTALL_CDEV
-#if experimental
+#if 0 /* experimental */
static devclass_t fb_devclass;
View
@@ -1628,7 +1628,7 @@ vga_load_state(video_adapter_t *adp, void *p)
inb(crtc_addr + 6); /* reset flip-flop */
outb(ATC, 0x20); /* enable palette */
-#if notyet /* a temporary workaround for kernel panic, XXX */
+#if 0 /* XXX a temporary workaround for kernel panic */
#ifndef VGA_NO_BIOS
if (adp->va_unit == V_ADP_PRIMARY) {
writeb(BIOS_PADDRTOVADDR(0x44a), buf[0]); /* COLS */
@@ -1640,7 +1640,7 @@ vga_load_state(video_adapter_t *adp, void *p)
#endif
}
#endif /* VGA_NO_BIOS */
-#endif /* notyet */
+#endif /* XXX */
crit_exit();
return 0;
@@ -1182,7 +1182,7 @@ vesa_load_palette(video_adapter_t *adp, const u_char *palette)
int ret;
lwkt_gettoken(&tty_token);
-#if notyet
+#if 0 /* notyet */
int bits;
int error;
@@ -1518,7 +1518,7 @@ set_palette(video_adapter_t *adp, int base, int count,
u_char *red, u_char *green, u_char *blue, u_char *trans)
{
return 1;
-#if notyet
+#if 0 /* notyet */
u_char *r;
u_char *g;
u_char *b;
@@ -58,7 +58,7 @@ struct linux_emuldata_shared {
#define LINUX_LES_USE_NPTL 0x2 /* Need to emulate NPTL threads */
struct linux_emuldata {
-#if notyet
+#if 0 /* notyet */
sigset_t ps_siginfo; /* Which signals have a RT handler */
#endif
int debugreg[8]; /* GDB information for ptrace - for use, */
@@ -605,7 +605,7 @@ bridge_modevent(module_t mod, int type, void *data)
bridge_detach_cookie = EVENTHANDLER_REGISTER(
ifnet_detach_event, bridge_ifdetach, NULL,
EVENTHANDLER_PRI_ANY);
-#if notyet
+#if 0 /* notyet */
bstp_linkstate_p = bstp_linkstate;
#endif
break;
@@ -618,7 +618,7 @@ bridge_modevent(module_t mod, int type, void *data)
bridge_input_p = NULL;
bridge_output_p = NULL;
bridge_interface_p = NULL;
-#if notyet
+#if 0 /* notyet */
bstp_linkstate_p = NULL;
#endif
break;
@@ -4083,7 +4083,7 @@ bridge_ip_checkbasic(struct mbuf **mp)
if (*mp == NULL)
return (-1);
-#if notyet
+#if 0 /* notyet */
if (IP_HDR_ALIGNED_P(mtod(m, caddr_t)) == 0) {
if ((m = m_copyup(m, sizeof(struct ip),
(max_linkhdr + 3) & ~3)) == NULL) {
@@ -4185,7 +4185,7 @@ bridge_ip6_checkbasic(struct mbuf **mp)
* it. Otherwise, if it is aligned, make sure the entire base
* IPv6 header is in the first mbuf of the chain.
*/
-#if notyet
+#if 0 /* notyet */
if (IP6_HDR_ALIGNED_P(mtod(m, caddr_t)) == 0) {
struct ifnet *inifp = m->m_pkthdr.rcvif;
if ((m = m_copyup(m, sizeof(struct ip6_hdr),
@@ -1895,7 +1895,7 @@ itjc_bchannel_setup(int unit, int h_chan, int bprot, int activate)
static void
itjc_bchannel_start(int unit, int h_chan)
{
-#if Buggy_code
+#if 0 /* buggy code */
/*
* I disabled this routine because it was causing crashes when
* this driver was used with the ISP (kernel SPPP) protocol driver.
@@ -1,5 +1,4 @@
/* $FreeBSD: src/sys/netkey/key_debug.c,v 1.10.2.5 2002/04/28 05:40:28 suz Exp $ */
-/* $DragonFly: src/sys/netproto/key/key_debug.c,v 1.9 2008/09/16 09:25:45 swildner Exp $ */
/* $KAME: key_debug.c,v 1.26 2001/06/27 10:46:50 sakane Exp $ */
/*
@@ -573,7 +572,7 @@ kdebug_secasv(struct secasvar *sav)
if (sav->lft_s != NULL)
kdebug_sadb_lifetime((struct sadb_ext *)sav->lft_s);
-#if notyet
+#if 0 /* notyet */
/* XXX: misc[123] ? */
#endif
@@ -273,7 +273,7 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
frame = (struct i386_frame *)(SP_REGS(&ddb_regs) - 4);
callpc = PC_REGS(&ddb_regs);
} else if (!INKERNEL(addr)) {
-#if needswork
+#if 0 /* needswork */
pid = (addr % 16) + ((addr >> 4) % 16) * 10 +
((addr >> 8) % 16) * 100 + ((addr >> 12) % 16) * 1000 +
((addr >> 16) % 16) * 10000;
View
@@ -24,7 +24,6 @@
* SUCH DAMAGE.
*
* $FreeBSD: src/sys/sys/bus.h,v 1.30.2.5 2004/03/17 17:54:25 njl Exp $
- * $DragonFly: src/sys/sys/bus.h,v 1.31 2008/10/03 00:26:21 hasso Exp $
*/
#ifndef _SYS_BUS_H_
@@ -453,7 +452,7 @@ void bus_data_generation_update(void);
* the bus that have no more specific driver for them (aka ugen).
*/
#define BUS_PROBE_SPECIFIC 0 /* Only I can use this device */
-#if notyet
+#if 0 /* notyet */
#define BUS_PROBE_VENDOR (-10) /* Vendor supplied driver */
#define BUS_PROBE_DEFAULT (-20) /* Base OS default driver */
#define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */
Oops, something went wrong.

0 comments on commit 122df98

Please sign in to comment.