*/
 void ipath_shutdown_device(struct ipath_devdata *dd)
 {
-       u64 val;
-
        ipath_dbg("Shutting down the device\n");
 
        dd->ipath_flags |= IPATH_LINKUNK;
         */
        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.
 
                             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,
        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.
                 * 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:
 
 static int ipath_ht_early_init(struct ipath_devdata *dd)
 {
        u32 __iomem *piobuf;
-       u32 pioincr, val32, egrsize;
+       u32 pioincr, val32;
        int i;
 
        /*
         * 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
 
  */
 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");
                | 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
                   "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);
 
 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);
 
         * 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;
 
                          size_t count)
 {
        struct ipath_devdata *dd = dev_get_drvdata(dev);
-       int unit;
        u16 mlid;
        int ret;
 
        if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE)
                goto invalid;
 
-       unit = dd->ipath_unit;
-
        dd->ipath_mlid = mlid;
 
        goto bail;