]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
s390/dasd: remove unneeded code
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 26 Jun 2017 17:26:55 +0000 (19:26 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 5 Jul 2017 05:35:29 +0000 (07:35 +0200)
Fix these set but not used warnings:

drivers/s390/block/dasd.c:3933:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
drivers/s390/block/dasd_alias.c:757:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]

In addition to that remove the test if an unsigned is < 0:

drivers/s390/block/dasd_devmap.c:153:11: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/block/dasd.c
drivers/s390/block/dasd_alias.c
drivers/s390/block/dasd_devmap.c

index 0f1fe4ff7f51aab674b89cce758e9bdf589d1103..670ac0a4ef4977425bae14465eb3c4d793af3582 100644 (file)
@@ -3921,7 +3921,6 @@ EXPORT_SYMBOL(dasd_schedule_requeue);
 int dasd_generic_pm_freeze(struct ccw_device *cdev)
 {
        struct dasd_device *device = dasd_device_from_cdev(cdev);
-       int rc;
 
        if (IS_ERR(device))
                return PTR_ERR(device);
@@ -3930,7 +3929,7 @@ int dasd_generic_pm_freeze(struct ccw_device *cdev)
        set_bit(DASD_FLAG_SUSPENDED, &device->flags);
 
        if (device->discipline->freeze)
-               rc = device->discipline->freeze(device);
+               device->discipline->freeze(device);
 
        /* disallow new I/O  */
        dasd_device_set_stop_bits(device, DASD_STOPPED_PM);
index 1e560188dd13808d86cebc705901ba1b25e45714..0e0e622eadc3828efafd721c259aca510984c326 100644 (file)
@@ -754,7 +754,6 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu)
        struct alias_pav_group *pavgroup;
        struct dasd_device *device, *temp;
        struct dasd_eckd_private *private;
-       int rc;
        unsigned long flags;
        LIST_HEAD(active);
 
@@ -785,7 +784,7 @@ static void flush_all_alias_devices_on_lcu(struct alias_lcu *lcu)
                device = list_first_entry(&active, struct dasd_device,
                                          alias_list);
                spin_unlock_irqrestore(&lcu->lock, flags);
-               rc = dasd_flush_device_queue(device);
+               dasd_flush_device_queue(device);
                spin_lock_irqsave(&lcu->lock, flags);
                /*
                 * only move device around if it wasn't moved away while we
index 7c7351276d2e75a5d048da49d821dc26cdaab1ff..779dce069cc5165b632b08ebd6968daf8545bd6f 100644 (file)
@@ -150,7 +150,7 @@ static int __init dasd_busid(char *str, int *id0, int *id1, int *devno)
        /* Old style 0xXXXX or XXXX */
        if (!kstrtouint(str, 16, &val)) {
                *id0 = *id1 = 0;
-               if (val < 0 || val > 0xffff)
+               if (val > 0xffff)
                        return -EINVAL;
                *devno = val;
                return 0;