]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ipath/ipath_intr.c
IB/ipath: Misc sparse warning cleanup
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ipath / ipath_intr.c
index ec18b9b1bb083f2f6c0313fbde6aed2b29d867a3..3b89952066573edaa41fd53e3d9401ff247df1c2 100644 (file)
@@ -59,9 +59,11 @@ static void ipath_clrpiobuf(struct ipath_devdata *dd, u32 pnum)
        dev_info(&dd->pcidev->dev,
                "Rewrite PIO buffer %u, to recover from parity error\n",
                pnum);
-       *pbuf = dwcnt+1; /* no flush required, since already in freeze */
-       while(--dwcnt)
-               *pbuf++ = 0;
+
+       /* no flush required, since already in freeze */
+       writel(dwcnt + 1, pbuf);
+       while (--dwcnt)
+               writel(0, pbuf++);
 }
 
 /*
@@ -693,7 +695,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
                                 * except kernel
                                 */
                                tl = *(u64 *) pd->port_rcvhdrtail_kvaddr;
-                               if (tl == dd->ipath_lastrcvhdrqtails[i])
+                               if (tl == pd->port_lastrcvhdrqtail)
                                        continue;
                                hd = ipath_read_ureg32(dd, ur_rcvhdrhead,
                                                       i);
@@ -703,7 +705,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
                            (!hd && tl == dd->ipath_hdrqlast)) {
                                if (i == 0)
                                        chkerrpkts = 1;
-                               dd->ipath_lastrcvhdrqtails[i] = tl;
+                               pd->port_lastrcvhdrqtail = tl;
                                pd->port_hdrqfull++;
                                /* flush hdrqfull so that poll() sees it */
                                wmb();
@@ -831,8 +833,8 @@ void ipath_clear_freeze(struct ipath_devdata *dd)
         */
        for (i = 0; i < dd->ipath_pioavregs; i++) {
                /* deal with 6110 chip bug */
-               im = i > 3 ? ((i&1) ? i-1 : i+1) : i;
-               val = ipath_read_kreg64(dd, (0x1000/sizeof(u64))+im);
+               im = i > 3 ? i ^ 1 : i;
+               val = ipath_read_kreg64(dd, (0x1000 / sizeof(u64)) + im);
                dd->ipath_pioavailregs_dma[i] = dd->ipath_pioavailshadow[i]
                        = le64_to_cpu(val);
        }
@@ -883,7 +885,7 @@ static noinline void ipath_bad_intr(struct ipath_devdata *dd, u32 *unexpectp)
                                dd->ipath_f_free_irq(dd);
                        }
                }
-               if (ipath_read_kreg32(dd, dd->ipath_kregs->kr_intmask)) {
+               if (ipath_read_ireg(dd, dd->ipath_kregs->kr_intmask)) {
                        ipath_dev_err(dd, "%u unexpected interrupts, "
                                      "disabling interrupts completely\n",
                                      *unexpectp);
@@ -975,7 +977,7 @@ static void handle_urcv(struct ipath_devdata *dd, u32 istat)
                if (portr & (1 << i) && pd && pd->port_cnt) {
                        if (test_and_clear_bit(IPATH_PORT_WAITING_RCV,
                                               &pd->port_flag)) {
-                               clear_bit(i + INFINIPATH_R_INTRAVAIL_SHIFT,
+                               clear_bit(i + dd->ipath_r_intravail_shift,
                                          &dd->ipath_rcvctrl);
                                wake_up_interruptible(&pd->port_wait);
                                rcvdint = 1;
@@ -1034,7 +1036,7 @@ irqreturn_t ipath_intr(int irq, void *data)
                goto bail;
        }
 
-       istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus);
+       istat = ipath_read_ireg(dd, dd->ipath_kregs->kr_intstatus);
 
        if (unlikely(!istat)) {
                ipath_stats.sps_nullintr++;