linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'
@ 2020-03-12 14:04 Chen Zhou
  2020-03-12 14:38 ` Bjorn Helgaas
  2020-03-26 12:06 ` Michael Ellerman
  0 siblings, 2 replies; 6+ messages in thread
From: Chen Zhou @ 2020-03-12 14:04 UTC (permalink / raw)
  To: paulus, mpe, tyreld, bhelgaas
  Cc: linuxppc-dev, linux-pci, linux-kernel, chenzhou10

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>
---
 drivers/pci/hotplug/rpaphp_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index e408e40..5d871ef 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -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;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-03-26 12:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 14:04 [PATCH -next] PCI: rpaphp: remove set but not used variable 'value' Chen Zhou
2020-03-12 14:38 ` Bjorn Helgaas
2020-03-12 14:41   ` Bjorn Helgaas
2020-03-12 21:36     ` Tyrel Datwyler
2020-03-13 10:43     ` Michael Ellerman
2020-03-26 12:06 ` Michael Ellerman

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).