From patchwork Tue Oct 1 19:03:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 279558 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id BBF562C0440 for ; Wed, 2 Oct 2013 05:04:17 +1000 (EST) Received: by ozlabs.org (Postfix) id 7E2E12C00BB; Wed, 2 Oct 2013 05:03:50 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from pokefinder.org (sauhun.de [89.238.76.85]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1C0EB2C009C for ; Wed, 2 Oct 2013 05:03:49 +1000 (EST) Received: from p4fe2569f.dip0.t-ipconnect.de ([79.226.86.159]:51586 helo=localhost) by pokefinder.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1VR5EX-0003g8-Pp; Tue, 01 Oct 2013 21:03:46 +0200 Date: Tue, 1 Oct 2013 21:03:44 +0200 From: Wolfram Sang To: Sebastian Andrzej Siewior Subject: Re: [PATCH] Revert "powerpc: 52xx: provide a default in mpc52xx_irqhost_map()" Message-ID: <20131001190344.GA3006@katana> References: <1380612366-13504-1-git-send-email-wsa@the-dreams.de> <524A7FCB.3020406@linutronix.de> <20131001091115.GB2993@katana> <524AF913.6020007@linutronix.de> MIME-Version: 1.0 In-Reply-To: <524AF913.6020007@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: linuxppc-dev@ozlabs.org, Anatolij Gustschin , linux-rt-users@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.16rc2 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" > > 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 Subject: [PATCH] ppc: mpc52xx: silence false positive from old GCC So people can compile with -Werror. Signed-off-by: Wolfram Sang --- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 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;