]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/ipath: Fix some sparse warnings about shadowed symbols
authorRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:42 +0000 (14:15 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:42 +0000 (14:15 -0800)
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>
drivers/infiniband/hw/ipath/ipath_eeprom.c
drivers/infiniband/hw/ipath/ipath_qp.c

index a5b6299ed6676e6f3aa4994a5d5f496d0f35a883..e28a42f5376920667d3f93bdfe8166fde26abda8 100644 (file)
@@ -574,7 +574,7 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd)
        struct ipath_devdata *dd0 = ipath_lookup(0);
 
        if (t && dd0->ipath_nguid > 1 && t <= dd0->ipath_nguid) {
-               u8 *bguid, oguid;
+               u8 oguid;
                dd->ipath_guid = dd0->ipath_guid;
                bguid = (u8 *) & dd->ipath_guid;
 
@@ -674,7 +674,6 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd)
                 * elsewhere for backward-compatibility.
                 */
                char *snp = dd->ipath_serial;
-               int len;
                memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix);
                snp[sizeof ifp->if_sprefix] = '\0';
                len = strlen(snp);
index b405906974ca4a3381637fbacacffc7f675fbe53..80dc623cee403637c5d828cc33a519204b869b1d 100644 (file)
@@ -855,8 +855,6 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
         * See ipath_mmap() for details.
         */
        if (udata && udata->outlen >= sizeof(__u64)) {
-               int err;
-
                if (!qp->r_rq.wq) {
                        __u64 offset = 0;