* [PATCH] pata_mpc52xx: NO_IRQ is zero
@ 2008-01-03 16:50 Alan Cox
2008-01-03 16:57 ` Michael Tokarev
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2008-01-03 16:50 UTC (permalink / raw)
To: jeff, linux-ide
Signed-off-by: Alan Cox <alan@redhat.com>
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pata_mpc52xx: NO_IRQ is zero
2008-01-03 16:50 [PATCH] pata_mpc52xx: NO_IRQ is zero Alan Cox
@ 2008-01-03 16:57 ` Michael Tokarev
0 siblings, 0 replies; 2+ messages in thread
From: Michael Tokarev @ 2008-01-03 16:57 UTC (permalink / raw)
To: Alan Cox; +Cc: jeff, linux-ide
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-03 16:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 16:50 [PATCH] pata_mpc52xx: NO_IRQ is zero Alan Cox
2008-01-03 16:57 ` Michael Tokarev
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).