From: Dan Carpenter <error27@gmail.com>
To: imunsie@au1.ibm.com
Cc: linux-kernel@vger.kernel.org, Karsten Keil <isdn@linux-pingi.de>,
"David S. Miller" <davem@davemloft.net>,
Andreas Eversberg <andreas@eversberg.eu>,
Andreas Mohr <andi@lisas.de>
Subject: Re: [PATCH] Explicitly ignore unused return value of _hfcpci_softirq
Date: Wed, 3 Mar 2010 11:31:28 +0300 [thread overview]
Message-ID: <20100303083128.GA17283@bicker> (raw)
In-Reply-To: <1267574453-7228-1-git-send-email-imunsie@au.ibm.com>
On Wed, Mar 03, 2010 at 11:00:53AM +1100, imunsie@au1.ibm.com wrote:
> From: Ian Munsie <imunsie@au.ibm.com>
>
> The compiler throws the following warning during compilation:
>
> drivers/isdn/hardware/mISDN/hfcpci.c:2319: warning: ignoring return value of 'driver_for_each_device', declared with attribute warn_unused_result
>
> driver_for_each_device is being used to call _hfcpci_softirq for each
> device, which will only ever return 0.
> This patch explicitly ignores the return value to silence the warning.
>
> Signed-off-by: Ian Munsie <imunsie@au.ibm.com>
> ---
> drivers/isdn/hardware/mISDN/hfcpci.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/isdn/hardware/mISDN/hfcpci.c b/drivers/isdn/hardware/mISDN/hfcpci.c
> index 70e6b0e..1333d4a 100644
> --- a/drivers/isdn/hardware/mISDN/hfcpci.c
> +++ b/drivers/isdn/hardware/mISDN/hfcpci.c
> @@ -2316,7 +2316,8 @@ _hfcpci_softirq(struct device *dev, void *arg)
> static void
> hfcpci_softirq(void *arg)
> {
> - (void) driver_for_each_device(&hfc_driver.driver, NULL, arg,
> + int err;
> + err = driver_for_each_device(&hfc_driver.driver, NULL, arg,
> _hfcpci_softirq);
>
Could you name the variable "dummy" instead of "err"? Every few months I go through
and look for code like what you have done here and it sucks to try figure out if
people are ignoring the errors on purpose or not.
regards,
dan carpenter
> /* if next event would be in the past ... */
> --
> 1.6.6.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2010-03-03 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 0:00 [PATCH] Explicitly ignore unused return value of _hfcpci_softirq imunsie
2010-03-03 8:31 ` Dan Carpenter [this message]
2010-03-04 4:16 ` [PATCH v2] mISDN: " Ian Munsie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100303083128.GA17283@bicker \
--to=error27@gmail.com \
--cc=andi@lisas.de \
--cc=andreas@eversberg.eu \
--cc=davem@davemloft.net \
--cc=imunsie@au1.ibm.com \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox