OSDN Git Service

PCI: rpaphp: Remove unused variable 'value'
authorChen Zhou <chenzhou10@huawei.com>
Thu, 12 Mar 2020 14:04:12 +0000 (22:04 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 25 Mar 2020 01:09:27 +0000 (12:09 +1100)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/pci/hotplug/rpaphp_core.c: In function is_php_type:
drivers/pci/hotplug/rpaphp_core.c:291:16: warning:
variable value set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200312140412.32373-1-chenzhou10@huawei.com
drivers/pci/hotplug/rpaphp_core.c

index e408e40..5d871ef 100644 (file)
@@ -288,11 +288,10 @@ EXPORT_SYMBOL_GPL(rpaphp_check_drc_props);
 
 static int is_php_type(char *drc_type)
 {
-       unsigned long value;
        char *endptr;
 
        /* PCI Hotplug nodes have an integer for drc_type */
-       value = simple_strtoul(drc_type, &endptr, 10);
+       simple_strtoul(drc_type, &endptr, 10);
        if (endptr == drc_type)
                return 0;