Messages in this thread | | | Date | Wed, 25 Apr 2012 20:42:31 -0400 (EDT) | Subject | Re: [PATCH] mISDN: Ignore return value of driver_for_each_device in function hfcpci_softirq. | From | David Miller <> |
| |
From: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Date: Wed, 25 Apr 2012 00:13:50 +0100
> 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@linux.com>
There is no value in the warning if we simply convert each such case to ignore the return value.
I'm not applying this, at least not with a more intelligent analysis of why any error or other non-zero value signalled by driver_for_each_device should be completely ignored, and no error handling should be performed.
| |