lkml.org 
[lkml]   [2012]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] mISDN: Ignore return value of driver_for_each_device in function hfcpci_softirq.
From
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.
\
 
 \ /
  Last update: 2012-04-26 02:47    [W:0.055 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site