From: Arthur Jones <[EMAIL PROTECTED]>

Recent sparse versions 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 <[EMAIL PROTECTED]>
---

 drivers/infiniband/hw/ipath/ipath_intr.c |    8 +++++---
 drivers/infiniband/hw/ipath/ipath_srq.c  |    3 ++-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c 
b/drivers/infiniband/hw/ipath/ipath_intr.c
index 92e58c9..3b89952 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -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++);
 }
 
 /*
diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c 
b/drivers/infiniband/hw/ipath/ipath_srq.c
index f772102..3366d66 100644
--- a/drivers/infiniband/hw/ipath/ipath_srq.c
+++ b/drivers/infiniband/hw/ipath/ipath_srq.c
@@ -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)

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to