Commit 3dd59e22 authored by Arthur Jones's avatar Arthur Jones Committed by Roland Dreier

IB/ipath: Misc sparse warning cleanup

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: default avatarArthur Jones <arthur.jones@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 680b575f
...@@ -59,9 +59,11 @@ static void ipath_clrpiobuf(struct ipath_devdata *dd, u32 pnum) ...@@ -59,9 +59,11 @@ static void ipath_clrpiobuf(struct ipath_devdata *dd, u32 pnum)
dev_info(&dd->pcidev->dev, dev_info(&dd->pcidev->dev,
"Rewrite PIO buffer %u, to recover from parity error\n", "Rewrite PIO buffer %u, to recover from parity error\n",
pnum); pnum);
*pbuf = dwcnt+1; /* no flush required, since already in freeze */
while(--dwcnt) /* no flush required, since already in freeze */
*pbuf++ = 0; writel(dwcnt + 1, pbuf);
while (--dwcnt)
writel(0, pbuf++);
} }
/* /*
......
...@@ -245,7 +245,8 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr, ...@@ -245,7 +245,8 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
sizeof(offset_addr)); sizeof(offset_addr));
if (ret) if (ret)
goto bail_free; goto bail_free;
udata->outbuf = (void __user *) offset_addr; udata->outbuf =
(void __user *) (unsigned long) offset_addr;
ret = ib_copy_to_udata(udata, &offset, ret = ib_copy_to_udata(udata, &offset,
sizeof(offset)); sizeof(offset));
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment