Thread (6 messages) 6 messages, 2 authors, 2013-10-02

Re: [PATCH] Revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()"

From: Wolfram Sang <hidden>
Date: 2013-10-01 19:03:49
Also in: linux-rt-users
Subsystem: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded mpc5xxx, the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Anatolij Gustschin, Linus Torvalds

quoted
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.
quoted
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 <redacted>
Subject: [PATCH] ppc: mpc52xx: silence false positive from old GCC

So people can compile with -Werror.

Signed-off-by: Wolfram Sang <redacted>
---
 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.
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help