Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Remove unused variables



details:   https://anonhg.NetBSD.org/src/rev/d4df6655d9c6
branches:  trunk
changeset: 790065:d4df6655d9c6
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Sep 15 15:49:38 2013 +0000

description:
Remove unused variables

diffstat:

 sys/dev/usb/usscanner.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (53 lines):

diff -r 0a33b703e021 -r d4df6655d9c6 sys/dev/usb/usscanner.c
--- a/sys/dev/usb/usscanner.c   Sun Sep 15 15:47:27 2013 +0000
+++ b/sys/dev/usb/usscanner.c   Sun Sep 15 15:49:38 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usscanner.c,v 1.36 2012/12/27 16:42:32 skrll Exp $     */
+/*     $NetBSD: usscanner.c,v 1.37 2013/09/15 15:49:38 martin Exp $    */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.36 2012/12/27 16:42:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.37 2013/09/15 15:49:38 martin Exp $");
 
 #include "scsibus.h"
 #include <sys/param.h>
@@ -700,7 +700,6 @@
 usscanner_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req, void *arg)
 {
        struct scsipi_xfer *xs;
-       struct scsipi_periph *periph;
        struct usscanner_softc *sc =
            device_private(chan->chan_adapter->adapt_dev);
        usbd_status err;
@@ -708,12 +707,11 @@
        switch (req) {
        case ADAPTER_REQ_RUN_XFER:
                xs = arg;
-               periph = xs->xs_periph;
 
                DPRINTFN(8, ("%s: usscanner_scsipi_request: %d:%d "
                    "xs=%p cmd=0x%02x datalen=%d (quirks=0x%x, poll=%d)\n",
                    device_xname(sc->sc_dev),
-                   periph->periph_target, periph->periph_lun,
+                   xs->xs_periph->periph_target, xs->xs_periph->periph_lun,
                    xs, xs->cmd->opcode, xs->datalen,
                    periph->periph_quirks, xs->xs_control & XS_CTL_POLL));
 
@@ -723,9 +721,10 @@
                }
 
 #ifdef USSCANNER_DEBUG
-               if (periph->periph_target != USSCANNER_SCSIID_DEVICE) {
+               if (xs->xs_periph->periph_target != USSCANNER_SCSIID_DEVICE) {
                        DPRINTF(("%s: wrong SCSI ID %d\n",
-                           device_xname(sc->sc_dev), periph->periph_target));
+                           device_xname(sc->sc_dev),
+                           xs->xs_periph->periph_target));
                        xs->error = XS_DRIVER_STUFFUP;
                        goto done;
                }



Home | Main Index | Thread Index | Old Index