]> git.baikalelectronics.ru Git - kernel.git/commitdiff
PCI: cpqphp: Remove set but not used variable 'physical_slot'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 26 Sep 2018 11:06:02 +0000 (11:06 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 2 Oct 2018 21:04:40 +0000 (16:04 -0500)
Fixes gcc '-Wunused-but-set-variable' warning:

  drivers/pci/hotplug/cpqphp_core.c: In function 'init_SERR':
  drivers/pci/hotplug/cpqphp_core.c:124:5: warning: variable 'physical_slot' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/cpqphp_core.c

index 95b7d60cf119ff87cd56fdcc9c1b82f14f92165a..16bbb183695acc020f2478d6499ae3736b419c03 100644 (file)
@@ -121,7 +121,6 @@ static int init_SERR(struct controller *ctrl)
 {
        u32 tempdword;
        u32 number_of_slots;
-       u8 physical_slot;
 
        if (!ctrl)
                return 1;
@@ -131,7 +130,6 @@ static int init_SERR(struct controller *ctrl)
        number_of_slots = readb(ctrl->hpc_reg + SLOT_MASK) & 0x0F;
        /* Loop through slots */
        while (number_of_slots) {
-               physical_slot = tempdword;
                writeb(0, ctrl->hpc_reg + SLOT_SERR);
                tempdword++;
                number_of_slots--;