diff options
author | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:42 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:42 -0500 |
commit | cf9542aa923982428fbf6a6f815c32ae2c3da8c7 (patch) | |
tree | 9e10e3b4920f1a98df8853fa59a52a20ac7ce8ec /drivers/infiniband | |
parent | 1d6e658e8e3247fcf0fa90c40fdfebf2e85a610e (diff) |
IB/ipath: Fix some sparse warnings about shadowed symbols
There are a few places in the ipath driver where a variable is
re-declared within a block where it is already in scope. Most of these
extra declarations can simply be removed, since the variable from the
outer scope is used in a way so that it does not need to keep its
variable across the block with the re-declaration.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_eeprom.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c index a5b6299ed66..e28a42f5376 100644 --- a/drivers/infiniband/hw/ipath/ipath_eeprom.c +++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c | |||
@@ -574,7 +574,7 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd) | |||
574 | struct ipath_devdata *dd0 = ipath_lookup(0); | 574 | struct ipath_devdata *dd0 = ipath_lookup(0); |
575 | 575 | ||
576 | if (t && dd0->ipath_nguid > 1 && t <= dd0->ipath_nguid) { | 576 | if (t && dd0->ipath_nguid > 1 && t <= dd0->ipath_nguid) { |
577 | u8 *bguid, oguid; | 577 | u8 oguid; |
578 | dd->ipath_guid = dd0->ipath_guid; | 578 | dd->ipath_guid = dd0->ipath_guid; |
579 | bguid = (u8 *) & dd->ipath_guid; | 579 | bguid = (u8 *) & dd->ipath_guid; |
580 | 580 | ||
@@ -674,7 +674,6 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd) | |||
674 | * elsewhere for backward-compatibility. | 674 | * elsewhere for backward-compatibility. |
675 | */ | 675 | */ |
676 | char *snp = dd->ipath_serial; | 676 | char *snp = dd->ipath_serial; |
677 | int len; | ||
678 | memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix); | 677 | memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix); |
679 | snp[sizeof ifp->if_sprefix] = '\0'; | 678 | snp[sizeof ifp->if_sprefix] = '\0'; |
680 | len = strlen(snp); | 679 | len = strlen(snp); |
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index b405906974c..80dc623cee4 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -855,8 +855,6 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
855 | * See ipath_mmap() for details. | 855 | * See ipath_mmap() for details. |
856 | */ | 856 | */ |
857 | if (udata && udata->outlen >= sizeof(__u64)) { | 857 | if (udata && udata->outlen >= sizeof(__u64)) { |
858 | int err; | ||
859 | |||
860 | if (!qp->r_rq.wq) { | 858 | if (!qp->r_rq.wq) { |
861 | __u64 offset = 0; | 859 | __u64 offset = 0; |
862 | 860 | ||