Skip to contentSkip to conversation

isdn: hfcpci_softirq: get func return to suppress compiler warning

PATCH In review Antonio Alecrim Jr 2 participants 2 messages Sep 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 isdn: hfcpci_softirq: get func return to suppress compiler warning

---
 drivers/isdn/hardware/mISDN/hfcpci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/isdn/hardware/mISDN/hfcpci.c +3 -1
index 7f910c7..5b8df75b 100644
@@ -2295,7 +2295,9 @@ _hfcpci_softirq(struct device *dev, void *arg)
 static void
 hfcpci_softirq(void *arg)
 {
-	(void) driver_for_each_device(&hfc_driver.driver, NULL, arg,
+	int ret;
+
+	ret = driver_for_each_device(&hfc_driver.driver, NULL, arg,
 				      _hfcpci_softirq);
 
 	/* if next event would be in the past ... */
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 10 lines · Antonio Alecrim Jr
---
 drivers/isdn/hardware/mISDN/hfcpci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/isdn/hardware/mISDN/hfcpci.c +0 -0
index 7f910c7..5b8df75b 100644

drivers/isdn/hardware/mISDN/hfcpci.c _hfcpci_softirq(struct device *dev, void *arg) · line 2303

Quoted 10 lines
drivers/isdn/hardware/mISDN/hfcpci.c +3 -1
@@ -2295,7 +2295,9 @@ _hfcpci_softirq(struct device *dev, void *arg)
 static void
 hfcpci_softirq(void *arg)
 {
-	(void) driver_for_each_device(&hfc_driver.driver, NULL, arg,
+	int ret;
+
+	ret = driver_for_each_device(&hfc_driver.driver, NULL, arg,
 				      _hfcpci_softirq);
 
 	/* if next event would be in the past ... */

This can result in a new compiler warning because ret is not used after it is assigned. Maybe add WARN_ON(ret)?

Ben.

Signature · 3 lines
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.