Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH 3/3] NET: MIPS: lantiq: return value of request_irq was not handled gracefully
Date: Fri, 18 Nov 2011 12:52:00 +0400	[thread overview]
Message-ID: <4EC61CB0.3080205@mvista.com> (raw)
In-Reply-To: <1321548165-22563-3-git-send-email-blogic@openwrt.org>

Hello.

On 17-11-2011 20:42, John Crispin wrote:

> The return values of request_irq() were not checked leading to the following
> error message.

> drivers/net/ethernet/lantiq_etop.c: In function 'ltq_etop_hw_init':
> drivers/net/ethernet/lantiq_etop.c:368:15: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result
> drivers/net/ethernet/lantiq_etop.c:377:15: warning: ignoring return value of 'request_irq', declared with attribute warn_unused_result

> Signed-off-by: John Crispin<blogic@openwrt.org>
> Acked-by: David S. Miller<davem@davemloft.net>
> ---
>   drivers/net/ethernet/lantiq_etop.c |   14 ++++++++------
>   1 files changed, 8 insertions(+), 6 deletions(-)

> diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
> index 9fd6779..dddb9fe 100644
> --- a/drivers/net/ethernet/lantiq_etop.c
> +++ b/drivers/net/ethernet/lantiq_etop.c
[...]
> @@ -364,21 +365,22 @@ ltq_etop_hw_init(struct net_device *dev)
>
>   		if (IS_TX(i)) {
>   			ltq_dma_alloc_tx(&ch->dma);
> -			request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
> +			err = request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,

    BTW, IRQF_DISABLED is a nop now, so could have dropped it...

>   				"etop_tx", priv);
>   		} else if (IS_RX(i)) {
>   			ltq_dma_alloc_rx(&ch->dma);
>   			for (ch->dma.desc = 0; ch->dma.desc<  LTQ_DESC_NUM;
>   					ch->dma.desc++)
>   				if (ltq_etop_alloc_skb(ch))
> -					return -ENOMEM;
> +					err = -ENOMEM;
>   			ch->dma.desc = 0;
> -			request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
> +			err = request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,

    Same here.

WBR, Sergei

      reply	other threads:[~2011-11-18  8:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 16:42 [PATCH 1/3] NET: MIPS: lantiq: make etop ethernet work on ase/ar9 John Crispin
2011-11-17 16:42 ` [PATCH 2/3] NET: MIPS: lantiq: non existing phy was not handled gracefully John Crispin
2011-11-17 16:42 ` [PATCH 3/3] NET: MIPS: lantiq: return value of request_irq " John Crispin
2011-11-18  8:52   ` Sergei Shtylyov [this message]

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=4EC61CB0.3080205@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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