* [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot'
@ 2018-09-26 11:06 YueHaibing
2018-09-26 19:24 ` Bjorn Helgaas
0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-09-26 11:06 UTC (permalink / raw)
To: Bjorn Helgaas, Kees Cook, Markus Elfring, Frederick Lawler,
Andy Shevchenko, Lukas Wunner, Tyrel Datwyler, Rafael J. Wysocki
Cc: YueHaibing, linux-pci, kernel-janitors, linux-kernel
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>
---
drivers/pci/hotplug/cpqphp_core.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index 95b7d60..16bbb18 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -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--;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot'
2018-09-26 11:06 [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot' YueHaibing
@ 2018-09-26 19:24 ` Bjorn Helgaas
0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2018-09-26 19:24 UTC (permalink / raw)
To: YueHaibing
Cc: Bjorn Helgaas, Kees Cook, Markus Elfring, Frederick Lawler,
Andy Shevchenko, Lukas Wunner, Tyrel Datwyler, Rafael J. Wysocki,
linux-pci, kernel-janitors, linux-kernel
On Wed, Sep 26, 2018 at 11:06:02AM +0000, YueHaibing wrote:
> 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>
Applied to pci/hotplug for v4.20, thanks!
> ---
> drivers/pci/hotplug/cpqphp_core.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
> index 95b7d60..16bbb18 100644
> --- a/drivers/pci/hotplug/cpqphp_core.c
> +++ b/drivers/pci/hotplug/cpqphp_core.c
> @@ -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--;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-26 19:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26 11:06 [PATCH -next] PCI: hotplug: Remove set but not used variable 'physical_slot' YueHaibing
2018-09-26 19:24 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).