From: Wolfram Sang <wsa@the-dreams.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linuxppc-dev@ozlabs.org, Anatolij Gustschin <agust@denx.de>,
linux-rt-users@vger.kernel.org
Subject: Re: [PATCH] Revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"
Date: Tue, 1 Oct 2013 21:03:44 +0200 [thread overview]
Message-ID: <20131001190344.GA3006@katana> (raw)
In-Reply-To: <524AF913.6020007@linutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]
> > So people can compile with -Werror (RT patchset).
>
> Why do you mention the RT patch set here? Doesn't the vanila tree gets
> compiled with -Werror as well?
Not for me.
> > irq_chip *irqchip = NULL; /* pet old compilers */
>
> That would probably work, too. I would drop that comment but then
> someone might clean that up :P
Yup. But I just remembered a better solution:
From: Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] ppc: mpc52xx: silence false positive from old GCC
So people can compile with -Werror.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index b89ef65..2898b73 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -340,7 +340,7 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
{
int l1irq;
int l2irq;
- struct irq_chip *irqchip;
+ struct irq_chip *uninitialized_var(irqchip);
void *hndlr;
int type;
u32 reg;
uninitialized_var was created for exactly that purpose IIRC.
> > People not realizing 'default' is a no-op might wonder why unknown
> > levels are mapped to critical.
>
> I see. And what would you suggest as default in case we would have an
> additional bit?
-Esome or a different error message. But let's postpone that until that
case happens ;)
> Hmmm. I assumed that critical / SDMA / … are interrupt numbers but they
> are seem not be. In that case I guess l2 is more important. l1 kinda
> looks important since it is the value in the switch case which failed
> but since it can only hold one possible value, I guess your info is
> better :)
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Wolfram Sang <wsa@the-dreams.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linuxppc-dev@ozlabs.org, linux-rt-users@vger.kernel.org,
Anatolij Gustschin <agust@denx.de>
Subject: Re: [PATCH] Revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"
Date: Tue, 1 Oct 2013 21:03:44 +0200 [thread overview]
Message-ID: <20131001190344.GA3006@katana> (raw)
In-Reply-To: <524AF913.6020007@linutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1878 bytes --]
> > So people can compile with -Werror (RT patchset).
>
> Why do you mention the RT patch set here? Doesn't the vanila tree gets
> compiled with -Werror as well?
Not for me.
> > irq_chip *irqchip = NULL; /* pet old compilers */
>
> That would probably work, too. I would drop that comment but then
> someone might clean that up :P
Yup. But I just remembered a better solution:
From: Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH] ppc: mpc52xx: silence false positive from old GCC
So people can compile with -Werror.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
---
arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pic.c b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
index b89ef65..2898b73 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_pic.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_pic.c
@@ -340,7 +340,7 @@ static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq,
{
int l1irq;
int l2irq;
- struct irq_chip *irqchip;
+ struct irq_chip *uninitialized_var(irqchip);
void *hndlr;
int type;
u32 reg;
uninitialized_var was created for exactly that purpose IIRC.
> > People not realizing 'default' is a no-op might wonder why unknown
> > levels are mapped to critical.
>
> I see. And what would you suggest as default in case we would have an
> additional bit?
-Esome or a different error message. But let's postpone that until that
case happens ;)
> Hmmm. I assumed that critical / SDMA / … are interrupt numbers but they
> are seem not be. In that case I guess l2 is more important. l1 kinda
> looks important since it is the value in the switch case which failed
> but since it can only hold one possible value, I guess your info is
> better :)
Thanks,
Wolfram
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-10-01 19:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 7:26 [PATCH] Revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()" Wolfram Sang
2013-10-01 7:26 ` Wolfram Sang
2013-10-01 7:54 ` Sebastian Andrzej Siewior
2013-10-01 7:54 ` Sebastian Andrzej Siewior
2013-10-01 9:11 ` Wolfram Sang
2013-10-01 9:11 ` Wolfram Sang
2013-10-01 16:32 ` Sebastian Andrzej Siewior
2013-10-01 16:32 ` Sebastian Andrzej Siewior
2013-10-01 19:03 ` Wolfram Sang [this message]
2013-10-01 19:03 ` Wolfram Sang
2013-10-02 7:12 ` Sebastian Andrzej Siewior
2013-10-02 7:12 ` Sebastian Andrzej Siewior
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=20131001190344.GA3006@katana \
--to=wsa@the-dreams.de \
--cc=agust@denx.de \
--cc=bigeasy@linutronix.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.