Skip to content

Commit

Permalink
IB/ipath: Fix sparse warning about shadowed symbol
Browse files Browse the repository at this point in the history
Fix

    drivers/infiniband/hw/ipath/ipath_init_chip.c:526:10: warning: symbol 'val' shadows an earlier one
    drivers/infiniband/hw/ipath/ipath_init_chip.c:473:6: originally declared here

by giving the second val a different name.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Arthur Jones <arthur.jones@qlogic.com>
  • Loading branch information
Roland Dreier committed Apr 17, 2008
1 parent 6ef6aee commit 6358ae2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/infiniband/hw/ipath/ipath_init_chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,16 +523,16 @@ static void enable_chip(struct ipath_devdata *dd,
* initial values of the generation bit correct.
*/
for (i = 0; i < dd->ipath_pioavregs; i++) {
__le64 val;
__le64 pioavail;

/*
* Chip Errata bug 6641; even and odd qwords>3 are swapped.
*/
if (i > 3 && (dd->ipath_flags & IPATH_SWAP_PIOBUFS))
val = dd->ipath_pioavailregs_dma[i ^ 1];
pioavail = dd->ipath_pioavailregs_dma[i ^ 1];
else
val = dd->ipath_pioavailregs_dma[i];
dd->ipath_pioavailshadow[i] = le64_to_cpu(val);
pioavail = dd->ipath_pioavailregs_dma[i];
dd->ipath_pioavailshadow[i] = le64_to_cpu(pioavail);
}
/* can get counters, stats, etc. */
dd->ipath_flags |= IPATH_PRESENT;
Expand Down

0 comments on commit 6358ae2

Please sign in to comment.