]> err.no Git - linux-2.6/commitdiff
IB/ipath: Remove unused "write-only" variables
authorRoland Dreier <rolandd@cisco.com>
Tue, 12 Dec 2006 19:50:20 +0000 (11:50 -0800)
committerRoland Dreier <rolandd@cisco.com>
Tue, 12 Dec 2006 19:50:20 +0000 (11:50 -0800)
Remove variables that are set but then never looked at in the ipath
driver.  These cleanups came from David Binderman's list of "set but
never used" warnings from icc.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_driver.c
drivers/infiniband/hw/ipath/ipath_file_ops.c
drivers/infiniband/hw/ipath/ipath_iba6110.c
drivers/infiniband/hw/ipath/ipath_iba6120.c
drivers/infiniband/hw/ipath/ipath_init_chip.c
drivers/infiniband/hw/ipath/ipath_intr.c
drivers/infiniband/hw/ipath/ipath_sysfs.c

index 1aeddb48e355651a2a18843989bb49b81a8e7390..ae7f21a0cdc0673377b4f6a2d443bb561d86d7f8 100644 (file)
@@ -1825,8 +1825,6 @@ void ipath_write_kreg_port(const struct ipath_devdata *dd, ipath_kreg regno,
  */
 void ipath_shutdown_device(struct ipath_devdata *dd)
 {
-       u64 val;
-
        ipath_dbg("Shutting down the device\n");
 
        dd->ipath_flags |= IPATH_LINKUNK;
@@ -1849,7 +1847,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd)
         */
        ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 0ULL);
        /* flush it */
-       val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
+       ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
        /*
         * enough for anything that's going to trickle out to have actually
         * done so.
index 340f27e3ebff50cb33f6834bdd70881dec49a973..b932bcb67a5edc8a99420dfd80e34bc41e93559e 100644 (file)
@@ -699,7 +699,6 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
                             int start_stop)
 {
        struct ipath_devdata *dd = pd->port_dd;
-       u64 tval;
 
        ipath_cdbg(PROC, "%sabling rcv for unit %u port %u:%u\n",
                   start_stop ? "en" : "dis", dd->ipath_unit,
@@ -729,7 +728,7 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
        ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
                         dd->ipath_rcvctrl);
        /* now be sure chip saw it before we return */
-       tval = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
+       ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
        if (start_stop) {
                /*
                 * And try to be sure that tail reg update has happened too.
@@ -738,7 +737,7 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
                 * in memory copy, since we could overwrite an update by the
                 * chip if we did.
                 */
-               tval = ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port);
+               ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port);
        }
        /* always; new head should be equal to new tail; see above */
 bail:
index e57c7a351cb5dcb1c4dd0ac6f2cefece2fb332e0..7468477ba837886f4c96f2e5e1e52ae0fcf57760 100644 (file)
@@ -1447,7 +1447,7 @@ static void ipath_ht_tidtemplate(struct ipath_devdata *dd)
 static int ipath_ht_early_init(struct ipath_devdata *dd)
 {
        u32 __iomem *piobuf;
-       u32 pioincr, val32, egrsize;
+       u32 pioincr, val32;
        int i;
 
        /*
@@ -1467,7 +1467,6 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
         * errors interrupts if we ever see one).
         */
        dd->ipath_rcvegrbufsize = dd->ipath_piosize2k;
-       egrsize = dd->ipath_rcvegrbufsize;
 
        /*
         * the min() check here is currently a nop, but it may not
index 6af89683f7100a6f79067db031703b88c038d326..397da3483af17dc1a3766208610639ff11fbbd63 100644 (file)
@@ -602,7 +602,7 @@ static void ipath_pe_init_hwerrors(struct ipath_devdata *dd)
  */
 static int ipath_pe_bringup_serdes(struct ipath_devdata *dd)
 {
-       u64 val, tmp, config1, prev_val;
+       u64 val, config1, prev_val;
        int ret = 0;
 
        ipath_dbg("Trying to bringup serdes\n");
@@ -633,7 +633,7 @@ static int ipath_pe_bringup_serdes(struct ipath_devdata *dd)
                | INFINIPATH_SERDC0_L1PWR_DN;
        ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val);
        /* be sure chip saw it */
-       tmp = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
+       ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
        udelay(5);              /* need pll reset set at least for a bit */
        /*
         * after PLL is reset, set the per-lane Resets and TxIdle and
@@ -647,7 +647,7 @@ static int ipath_pe_bringup_serdes(struct ipath_devdata *dd)
                   "and txidle (%llx)\n", (unsigned long long) val);
        ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val);
        /* be sure chip saw it */
-       tmp = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
+       ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
        /* need PLL reset clear for at least 11 usec before lane
         * resets cleared; give it a few more to be sure */
        udelay(15);
index d819cca524cd9ac2260e24ee438ac131a9273eb0..d4f6b5239ef85f3035c05801adb5432c4b446067 100644 (file)
@@ -347,10 +347,9 @@ done:
 static int init_chip_reset(struct ipath_devdata *dd,
                           struct ipath_portdata **pdp)
 {
-       struct ipath_portdata *pd;
        u32 rtmp;
 
-       *pdp = pd = dd->ipath_pd[0];
+       *pdp = dd->ipath_pd[0];
        /* ensure chip does no sends or receives while we re-initialize */
        dd->ipath_control = dd->ipath_sendctrl = dd->ipath_rcvctrl = 0U;
        ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 0);
index 5652a550d442858564b39795a9809f451ce31e29..72b9e279d19daa10a3ece87c2b830cc7ae8a599d 100644 (file)
@@ -598,10 +598,9 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
         * on close
         */
        if (errs & INFINIPATH_E_RRCVHDRFULL) {
-               int any;
                u32 hd, tl;
                ipath_stats.sps_hdrqfull++;
-               for (any = i = 0; i < dd->ipath_cfgports; i++) {
+               for (i = 0; i < dd->ipath_cfgports; i++) {
                        struct ipath_portdata *pd = dd->ipath_pd[i];
                        if (i == 0) {
                                hd = dd->ipath_port0head;
index 182de34f9f476f84d1c289992bf61b4ff21f6cc1..ffa6318ad0cc42132be7259ca0bf433641bbea08 100644 (file)
@@ -215,7 +215,6 @@ static ssize_t store_mlid(struct device *dev,
                          size_t count)
 {
        struct ipath_devdata *dd = dev_get_drvdata(dev);
-       int unit;
        u16 mlid;
        int ret;
 
@@ -223,8 +222,6 @@ static ssize_t store_mlid(struct device *dev,
        if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE)
                goto invalid;
 
-       unit = dd->ipath_unit;
-
        dd->ipath_mlid = mlid;
 
        goto bail;