]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
cciss: fix shadows sparse warning
authorBill Pemberton <wfp5p@virginia.edu>
Fri, 30 Apr 2010 13:34:32 +0000 (09:34 -0400)
committerJiri Kosina <jkosina@suse.cz>
Tue, 11 May 2010 07:59:26 +0000 (09:59 +0200)
Fix sparse warnings:

drivers/block/cciss.c:1591:37: warning: symbol 'i' shadows an earlier one
drivers/block/cciss.c:2437:21: warning: symbol 'i' shadows an earlier one

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Acked-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/block/cciss.c

index eb5ff0531cfb33cf41df0a089bf8eb7a0119099f..51ceaee98f9feb8c7275a9877cb54866ffe2375a 100644 (file)
@@ -1588,7 +1588,6 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
 
                        c->Request = ioc->Request;
                        if (ioc->buf_size > 0) {
-                               int i;
                                for (i = 0; i < sg_used; i++) {
                                        temp64.val =
                                            pci_map_single(host->pdev, buff[i],
@@ -2434,7 +2433,7 @@ static int deregister_disk(ctlr_info_t *h, int drv_index,
 
        /* if it was the last disk, find the new hightest lun */
        if (clear_all && recalculate_highest_lun) {
-               int i, newhighest = -1;
+               int newhighest = -1;
                for (i = 0; i <= h->highest_lun; i++) {
                        /* if the disk has size > 0, it is available */
                        if (h->drv[i] && h->drv[i]->heads)