]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
usb: storage: sddr09: Remove a set-but-not-used variable
authorAugusto Mecking Caringi <augustocaringi@gmail.com>
Tue, 24 Jan 2017 18:11:23 +0000 (18:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Jan 2017 09:52:43 +0000 (10:52 +0100)
The 'isnew' variable in 'sddr09_write_lba' function is set but never
used.

This has been detected by building the driver with W=1:

drivers/usb/storage/sddr09.c: In function ‘sddr09_write_lba’:
drivers/usb/storage/sddr09.c:873:17: warning: variable ‘isnew’ set but
not used [-Wunused-but-set-variable]
int i, result, isnew;
                 ^

Signed-off-by: Augusto Mecking Caringi <augustocaringi@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/sddr09.c

index 3aeaa536c44f9e2a67967025a33d03d091603d4f..44f8ffccd0317d90f2a9f2e4e6f09774c675497a 100644 (file)
@@ -870,13 +870,12 @@ sddr09_write_lba(struct us_data *us, unsigned int lba,
        unsigned int pagelen;
        unsigned char *bptr, *cptr, *xptr;
        unsigned char ecc[3];
-       int i, result, isnew;
+       int i, result;
 
        lbap = ((lba % 1000) << 1) | 0x1000;
        if (parity[MSB_of(lbap) ^ LSB_of(lbap)])
                lbap ^= 1;
        pba = info->lba_to_pba[lba];
-       isnew = 0;
 
        if (pba == UNDEF) {
                pba = sddr09_find_unused_pba(info, lba);
@@ -887,7 +886,6 @@ sddr09_write_lba(struct us_data *us, unsigned int lba,
                }
                info->pba_to_lba[pba] = lba;
                info->lba_to_pba[lba] = pba;
-               isnew = 1;
        }
 
        if (pba == 1) {