IB/ipath: Misc sparse warning cleanup
authorArthur Jones <arthur.jones@qlogic.com>
Thu, 17 Apr 2008 04:01:11 +0000 (21:01 -0700)
committerRoland Dreier <rolandd@cisco.com>
Thu, 17 Apr 2008 04:01:11 +0000 (21:01 -0700)
Recent sparse versions and kernel cleanups knock down the false positive
rate of the ipath driver code to a point where having it be sparse clean
is worthwhile. Here we fixup the sparse warnings.  Some of these warnings
(and the impetus to run sparse again) are due to work by Roland Dreier.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/ipath/ipath_intr.c
drivers/infiniband/hw/ipath/ipath_srq.c

index 92e58c921522c2e1eae807e077b9322e65c74ae3..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++);
 }
 
 /*
index f772102e4713813e805f251d5981a50535f7aaf3..3366d66ce1553a2967a277d12818a1a74e46b7fc 100644 (file)
@@ -245,7 +245,8 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
                                                 sizeof(offset_addr));
                        if (ret)
                                goto bail_free;
-                       udata->outbuf = (void __user *) offset_addr;
+                       udata->outbuf =
+                               (void __user *) (unsigned long) offset_addr;
                        ret = ib_copy_to_udata(udata, &offset,
                                               sizeof(offset));
                        if (ret)