linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: jeff@garzik.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] pata_mpc52xx: NO_IRQ is zero
Date: Thu, 03 Jan 2008 19:57:49 +0300	[thread overview]
Message-ID: <477D140D.8020104@msgid.tls.msk.ru> (raw)
In-Reply-To: <20080103165014.483fcf10@lxorguk.ukuu.org.uk>

Alan Cox wrote:
> Signed-off-by: Alan Cox <alan@redhat.com>

The comment is misleading at best...

It doesn't matter if NO_IRQ is zero or not here, because ata_irq
is not a static/global variable, but a local one.  By removing the
initializer, here, the semantics changes.

But in this very case, it's safe to remove the initializer,
because this variable gets initialized a few lines below this
code snipped, in:

        ata_irq = irq_of_parse_and_map(op->node, 0);

(and there's no other goto's before that, either).

/mjt

> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.24-rc6-mm1/drivers/ata/pata_mpc52xx.c linux-2.6.24-rc6-mm1/drivers/ata/pata_mpc52xx.c
> --- linux.vanilla-2.6.24-rc6-mm1/drivers/ata/pata_mpc52xx.c	2008-01-02 16:03:58.000000000 +0000
> +++ linux-2.6.24-rc6-mm1/drivers/ata/pata_mpc52xx.c	2008-01-02 16:13:08.000000000 +0000
> @@ -364,7 +364,7 @@
>  {
>  	unsigned int ipb_freq;
>  	struct resource res_mem;
> -	int ata_irq = NO_IRQ;
> +	int ata_irq;
>  	struct mpc52xx_ata __iomem *ata_regs;
>  	struct mpc52xx_ata_priv *priv;
>  	int rv;


      reply	other threads:[~2008-01-03 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 16:50 [PATCH] pata_mpc52xx: NO_IRQ is zero Alan Cox
2008-01-03 16:57 ` Michael Tokarev [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=477D140D.8020104@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jeff@garzik.org \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).