kernel: Remove some unused variables in gpio/spic/cardbus/ndis.
authorSascha Wildner <saw@online.de>
Fri, 4 Jan 2013 02:23:10 +0000 (03:23 +0100)
committerSascha Wildner <saw@online.de>
Fri, 4 Jan 2013 02:23:56 +0000 (03:23 +0100)
sys/dev/misc/gpio/gpio.c
sys/dev/misc/spic/spic.c
sys/dev/pccard/cardbus/cardbus.c
sys/emulation/ndis/subr_ndis.c
sys/emulation/ndis/subr_ntoskrnl.c
sys/emulation/ndis/subr_u4bd.c

index c91301d..64bb9cb 100644 (file)
@@ -298,12 +298,10 @@ gpio_pin_caps(struct gpio *gp, struct gpio_mapping *map, int pin)
 static int
 gpio_open(struct dev_open_args *ap)
 {
-       struct gpio     *gp;
        gpio_pin_t      *pin;
        cdev_t  dev;
 
        dev = ap->a_head.a_dev;
-       gp = dev->si_drv1;
        pin = dev->si_drv2;
 
        if (pin->pin_opened || pin->pin_mapped)
@@ -317,12 +315,10 @@ gpio_open(struct dev_open_args *ap)
 static int
 gpio_close(struct dev_close_args *ap)
 {
-       struct gpio     *gp;
        gpio_pin_t      *pin;
        cdev_t  dev;
 
        dev = ap->a_head.a_dev;
-       gp = dev->si_drv1;
        pin = dev->si_drv2;
 
        if (pin->pin_opened)
index 3af022c..5c9488e 100644 (file)
@@ -512,10 +512,6 @@ spicread(struct dev_read_args *ap)
 static int
 spicioctl(struct dev_ioctl_args *ap)
 {
-       struct spic_softc *sc;
-
-       sc = devclass_get_softc(spic_devclass, 0);
-
        return EIO;
 }
 
index b0a9594..3b2d634 100644 (file)
@@ -320,10 +320,8 @@ static int
 cardbus_read_ivar(device_t cbdev, device_t child, int which, uintptr_t *result)
 {
        struct cardbus_devinfo *dinfo;
-       pcicfgregs *cfg;
 
        dinfo = device_get_ivars(child);
-       cfg = &dinfo->pci.cfg;
 
        switch (which) {
        case PCI_IVAR_ETHADDR:
index fcd37c9..4670c2e 100644 (file)
@@ -1091,12 +1091,6 @@ static void
 NdisMInitializeTimer(ndis_miniport_timer *timer, ndis_handle handle,
     ndis_timer_function func, void *ctx)
 {
-       ndis_miniport_block     *block;
-       struct ndis_softc       *sc;
-
-       block = (ndis_miniport_block *)handle;
-       sc = device_get_softc(block->nmb_physdeviceobj->do_devext);
-
        /* Save the driver's funcptr and context */
 
        timer->nmt_timerfunc = func;
index c622de2..0048f10 100644 (file)
@@ -3177,7 +3177,6 @@ KeSetEvent(nt_kevent *kevent, uint32_t increment, uint8_t kwait)
        uint32_t                prevstate;
        wait_block              *w;
        nt_dispatch_header      *dh;
-       struct thread           *td;
        wb_ext                  *we;
 
        lockmgr(&ntoskrnl_dispatchlock, LK_EXCLUSIVE);
@@ -3204,7 +3203,6 @@ KeSetEvent(nt_kevent *kevent, uint32_t increment, uint8_t kwait)
                w = CONTAINING_RECORD(dh->dh_waitlisthead.nle_flink,
                    wait_block, wb_waitlist);
                we = w->wb_ext;
-               td = we->we_td;
                if (kevent->k_header.dh_type == DISP_TYPE_NOTIFICATION_EVENT ||
                    w->wb_waittype == WAITTYPE_ALL) {
                        if (prevstate == 0) {
index 5b8fc96..909c774 100644 (file)
@@ -1093,7 +1093,6 @@ usbd_xfertask(device_object *dobj, void *arg)
 {
        int error;
        irp *ip;
-       device_t dev;
        list_entry *l;
        struct ndis_softc *sc = arg;
        struct ndisusb_xferdone *nd;
@@ -1104,8 +1103,6 @@ usbd_xfertask(device_object *dobj, void *arg)
        usb_error_t status;
        void *priv;
 
-       dev = sc->ndis_dev;
-
        if (IsListEmpty(&sc->ndisusb_xferdonelist))
                return;