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 RESEND 15/17] NET: MIPS: lantiq: return value of request_irq was not handled gracefully
Date: Thu, 12 Jan 2012 15:33:55 +0400	[thread overview]
Message-ID: <4F0EC523.7040608@mvista.com> (raw)
In-Reply-To: <1326314674-9899-15-git-send-email-blogic@openwrt.org>

Hello.

On 12-01-2012 0:44, 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..659c868 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, 0,
>   				"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;

   This 'err' will get overwrtitten by subseuent request_irq().

>   			ch->dma.desc = 0;
> -			request_irq(irq, ltq_etop_dma_irq, IRQF_DISABLED,
> +			err = request_irq(irq, ltq_etop_dma_irq, 0,
>   				"etop_rx", priv);
>   		}
> -		ch->dma.irq = irq;
> +		if (!err)
> +			ch->dma.irq = irq;
>   	}
> -	return 0;
> +	return err;
>   }

WBR, Sergei

  reply	other threads:[~2012-01-12 11:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 20:44 [PATCH RESEND 01/17] MIPS: lantiq: reorganize xway code John Crispin
2012-01-11 20:44 ` [PATCH RESEND 02/17] MIPS: lantiq: change ltq_request_gpio() call signature John Crispin
2012-01-17 14:19   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 03/17] MIPS: lantiq: make irq.c support the FALC-ON John Crispin
2012-01-17 14:19   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 04/17] MIPS: lantiq: add basic support for FALC-ON John Crispin
2012-01-11 20:44 ` [PATCH RESEND 05/17] MIPS: lantiq: add support for FALC-ON GPIOs John Crispin
2012-01-11 20:44 ` [PATCH RESEND 06/17] MIPS: lantiq: add support for the EASY98000 evaluation board John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 07/17] MIPS: lantiq: fix early printk John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 08/17] MIPS: lantiq: fix cmdline parsing John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 09/17] MIPS: lantiq: fix STP gpio groups John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 10/17] MIPS: lantiq: fix pull gpio up resistors usage John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 11/17] MIPS: lantiq: add default configs John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 12/17] MAINTAINERS: add entry for Lantiq related files John Crispin
2012-01-11 20:44 ` [PATCH RESEND 13/17] NET: MIPS: lantiq: make etop ethernet work on ase/ar9 John Crispin
2012-01-17 14:21   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 14/17] NET: MIPS: lantiq: non existing phy was not handled gracefully John Crispin
2012-01-11 20:44 ` [PATCH RESEND 15/17] NET: MIPS: lantiq: return value of request_irq " John Crispin
2012-01-12 11:33   ` Sergei Shtylyov [this message]
2012-01-11 20:44 ` [PATCH RESEND 16/17] MIPS: make oprofile use cp0_perfcount_irq if it is set John Crispin
2012-01-12 11:37   ` Sergei Shtylyov
2012-01-12 15:38   ` Sergei Shtylyov
2012-01-12 14:49     ` Guenter Roeck
2012-01-12 17:02     ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 17/17] MIPS: lantiq: enable oprofile support on lantiq targets John Crispin
2012-01-17 14:22   ` Ralf Baechle
2012-01-13 12:38 ` [PATCH RESEND 01/17] MIPS: lantiq: reorganize xway code Ralf Baechle

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=4F0EC523.7040608@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