From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17985C7618B for ; Fri, 26 Jul 2019 13:17:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E135D218D4 for ; Fri, 26 Jul 2019 13:17:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564147028; bh=16vuuIEmC5zto1pOTUsKkbAwpGWoc+mQTbLCBqIl3X4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=XmAx9jvzp8+2tMdo/aYXenCQxleLarkveCoOaYUvRYAYxCbxNW/EJSI+Sv21EAOe5 KO25qkzaXTRAVF9V5AeGU6oaoIrHRvwB1B8+qZbliSyvwaoLK3mqjBLPuDtkXVBjfk +8zzlhpWaN3irlfKX/Nr0f1Vv0RlhOYmmSkO8eqs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727341AbfGZNRG convert rfc822-to-8bit (ORCPT ); Fri, 26 Jul 2019 09:17:06 -0400 Received: from foss.arm.com ([217.140.110.172]:43390 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbfGZNRF (ORCPT ); Fri, 26 Jul 2019 09:17:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E170F337; Fri, 26 Jul 2019 06:17:04 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0EDB13F694; Fri, 26 Jul 2019 06:17:03 -0700 (PDT) Date: Fri, 26 Jul 2019 14:17:02 +0100 Message-ID: <86a7d1ndf5.wl-maz@kernel.org> From: Marc Zyngier To: Anders Roxell Cc: tglx@linutronix.de, jason@lakedaemon.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] irqchip: gic-v3: Mark expected switch fall-through In-Reply-To: <20190726112826.19825-1-anders.roxell@linaro.org> References: <20190726112826.19825-1-anders.roxell@linaro.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Jul 2019 12:28:26 +0100, Anders Roxell wrote: > > When fall-through warnings was enabled by default the following warning > was starting to show up: > > In file included from ../arch/arm64/include/asm/cputype.h:132, > from ../arch/arm64/include/asm/cache.h:8, > from ../include/linux/cache.h:6, > from ../include/linux/printk.h:9, > from ../include/linux/kernel.h:15, > from ../include/linux/list.h:9, > from ../include/linux/kobject.h:19, > from ../include/linux/of.h:17, > from ../include/linux/irqdomain.h:35, > from ../include/linux/acpi.h:13, > from ../drivers/irqchip/irq-gic-v3.c:9: > ../drivers/irqchip/irq-gic-v3.c: In function ‘gic_cpu_sys_reg_init’: > ../arch/arm64/include/asm/sysreg.h:853:2: warning: this statement may fall > through [-Wimplicit-fallthrough=] > asm volatile(__msr_s(r, "%x0") : : "rZ" (__val)); \ > ^~~ > ../arch/arm64/include/asm/arch_gicv3.h:20:29: note: in expansion of macro ‘write_sysreg_s’ > #define write_gicreg(v, r) write_sysreg_s(v, SYS_ ## r) > ^~~~~~~~~~~~~~ > ../drivers/irqchip/irq-gic-v3.c:773:4: note: in expansion of macro ‘write_gicreg’ > write_gicreg(0, ICC_AP0R2_EL1); > ^~~~~~~~~~~~ > ../drivers/irqchip/irq-gic-v3.c:774:3: note: here > case 6: > ^~~~ > > Rework so that the compiler doesn't warn about fall-through. > > Fixes: d93512ef0f0e ("Makefile: Globally enable fall-through warning") > Signed-off-by: Anders Roxell > --- > drivers/irqchip/irq-gic-v3.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index 9bca4896fa6f..96d927f0f91a 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -771,8 +771,10 @@ static void gic_cpu_sys_reg_init(void) > case 7: > write_gicreg(0, ICC_AP0R3_EL1); > write_gicreg(0, ICC_AP0R2_EL1); > + /* Fall through */ > case 6: > write_gicreg(0, ICC_AP0R1_EL1); > + /* Fall through */ > case 5: > case 4: > write_gicreg(0, ICC_AP0R0_EL1); > @@ -786,8 +788,10 @@ static void gic_cpu_sys_reg_init(void) > case 7: > write_gicreg(0, ICC_AP1R3_EL1); > write_gicreg(0, ICC_AP1R2_EL1); > + /* Fall through */ > case 6: > write_gicreg(0, ICC_AP1R1_EL1); > + /* Fall through */ > case 5: > case 4: > write_gicreg(0, ICC_AP1R0_EL1); > -- > 2.20.1 > Applied, thanks. M. -- Jazz is not dead, it just smells funny.