mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matteo Croce <mcroce@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <maz@kernel.org>
Subject: [PATCH] irqchip/gic-v3: mark expected switch fall-through
Date: Mon, 29 Jul 2019 02:11:19 +0200	[thread overview]
Message-ID: <20190729001119.2478-1-mcroce@redhat.com> (raw)

Mark switch cases where we are expecting to fall through,
fixes the following warnings:

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:
   ^~~~

drivers/irqchip/irq-gic-v3.c:788:3: note: in expansion of macro ‘write_gicreg’
   write_gicreg(0, ICC_AP1R2_EL1);
   ^~~~~~~~~~~~
  CC      net/ipv4/af_inet.o
drivers/irqchip/irq-gic-v3.c:789:2: note: here
  case 6:
  ^~~~

./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:790:3: note: in expansion of macro ‘write_gicreg’
   write_gicreg(0, ICC_AP1R1_EL1);
   ^~~~~~~~~~~~
drivers/irqchip/irq-gic-v3.c:791:2: note: here
  case 5:
  ^~~~

Signed-off-by: Matteo Croce <mcroce@redhat.com>
---
 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..4a5d220698f6 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);
+			/* fallthrough */
 		case 6:
 			write_gicreg(0, ICC_AP0R1_EL1);
+			/* fallthrough */
 		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);
+		/* fallthrough */
 	case 6:
 		write_gicreg(0, ICC_AP1R1_EL1);
+		/* fallthrough */
 	case 5:
 	case 4:
 		write_gicreg(0, ICC_AP1R0_EL1);
-- 
2.21.0


             reply	other threads:[~2019-07-29  0:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-29  0:11 Matteo Croce [this message]
2019-07-29  9:53 ` Marc Zyngier

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=20190729001119.2478-1-mcroce@redhat.com \
    --to=mcroce@redhat.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®