]> err.no Git - linux-2.6/commitdiff
IB/core: Fix sparse warnings about shadowed declarations
authorRoland Dreier <rolandd@cisco.com>
Fri, 16 Feb 2007 22:41:14 +0000 (14:41 -0800)
committerRoland Dreier <rolandd@cisco.com>
Fri, 16 Feb 2007 22:41:14 +0000 (14:41 -0800)
Change a couple of variable names to avoid sparse warnings about
symbols being shadowed.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/fmr_pool.c
drivers/infiniband/core/sysfs.c

index 8926a2bd4a8707d7b765432253a400c3719e9860..1d796e7c81991e6845c16ff3e6d1f323286afd92 100644 (file)
@@ -301,7 +301,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
 
        {
                struct ib_pool_fmr *fmr;
-               struct ib_fmr_attr attr = {
+               struct ib_fmr_attr fmr_attr = {
                        .max_pages  = params->max_pages_per_fmr,
                        .max_maps   = pool->max_remaps,
                        .page_shift = params->page_shift
@@ -321,7 +321,7 @@ struct ib_fmr_pool *ib_create_fmr_pool(struct ib_pd             *pd,
                        fmr->ref_count        = 0;
                        INIT_HLIST_NODE(&fmr->cache_node);
 
-                       fmr->fmr = ib_alloc_fmr(pd, params->access, &attr);
+                       fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr);
                        if (IS_ERR(fmr->fmr)) {
                                printk(KERN_WARNING "fmr_create failed for FMR %d", i);
                                kfree(fmr);
index 709323c14c5d3fff1fba12f50c6290e0a17d6a4a..000c086bf2e9bf9d6ec0e8d90e7d9c5cec7fc4ec 100644 (file)
@@ -714,8 +714,6 @@ int ib_device_register_sysfs(struct ib_device *device)
                if (ret)
                        goto err_put;
        } else {
-               int i;
-
                for (i = 1; i <= device->phys_port_cnt; ++i) {
                        ret = add_port(device, i);
                        if (ret)