lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 25 Apr 2012 00:13:50 +0100
From:	Krzysztof Wilczynski <krzysztof.wilczynski@...ux.com>
To:	Karsten Keil <isdn@...ux-pingi.de>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Simon Horman <horms@...ge.net.au>,
	Jiri Kosina <trivial@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] mISDN: Ignore return value of driver_for_each_device in function hfcpci_softirq.

Function hfcpci_softirq uses driver_for_each_device to call _hfcpci_softirq for
each device. Given that _hfcpci_softirq always returns 0, we collect this return
value and simply do nothing with it.  This is purely to address the following
warning during compilation time:

  drivers/isdn/hardware/mISDN/hfcpci.c: In function ‘hfcpci_softirq’:
  drivers/isdn/hardware/mISDN/hfcpci.c:2319: warning: ignoring return value of
    ‘driver_for_each_device’, declared with attribute warn_unused_result

Similar approach was used in function cx18_alsa_exit from "cx18-alsa-main.c".

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@...ux.com>
---
 drivers/isdn/hardware/mISDN/hfcpci.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
index e2c83a2..f0d0180 100644
--- a/drivers/isdn/hardware/mISDN/hfcpci.c
+++ b/drivers/isdn/hardware/mISDN/hfcpci.c
@@ -2316,8 +2316,11 @@ _hfcpci_softirq(struct device *dev, void *arg)
 static void
 hfcpci_softirq(void *arg)
 {
-	(void) driver_for_each_device(&hfc_driver.driver, NULL, arg,
-				      _hfcpci_softirq);
+	int ret;
+
+	/* Collect return value, but do not use it; suppress GCC warning ... */
+	ret = driver_for_each_device(&hfc_driver.driver, NULL, arg,
+				     _hfcpci_softirq);
 
 	/* if next event would be in the past ... */
 	if ((s32)(hfc_jiffies + tics - jiffies) <= 0)
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ