linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip: tb10x: use 'fallthrough' to eliminate a warning
@ 2021-04-22  5:16 Randy Dunlap
  2021-04-22 13:07 ` [irqchip: irq/irqchip-next] irqchip/tb10x: Use " irqchip-bot for Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2021-04-22  5:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Thomas Gleixner, Marc Zyngier, Christian Ruppert

Use the 'fallthrough' macro to document that this switch case
does indeed fall through to the next case.

../drivers/irqchip/irq-tb10x.c: In function 'tb10x_irq_set_type':
../drivers/irqchip/irq-tb10x.c:62:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
   62 |   flow_type = IRQ_TYPE_LEVEL_LOW;
../drivers/irqchip/irq-tb10x.c:63:2: note: here
   63 |  case IRQ_TYPE_LEVEL_LOW:
      |  ^~~~

Fixes: b06eb0173ef1 ("irqchip: Add TB10x interrupt controller driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Christian Ruppert <christian.ruppert@abilis.com>
---
 drivers/irqchip/irq-tb10x.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-next-20210420.orig/drivers/irqchip/irq-tb10x.c
+++ linux-next-20210420/drivers/irqchip/irq-tb10x.c
@@ -60,6 +60,7 @@ static int tb10x_irq_set_type(struct irq
 		break;
 	case IRQ_TYPE_NONE:
 		flow_type = IRQ_TYPE_LEVEL_LOW;
+		fallthrough;
 	case IRQ_TYPE_LEVEL_LOW:
 		mod ^= im;
 		pol ^= im;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [irqchip: irq/irqchip-next] irqchip/tb10x: Use 'fallthrough' to eliminate a warning
  2021-04-22  5:16 [PATCH] irqchip: tb10x: use 'fallthrough' to eliminate a warning Randy Dunlap
@ 2021-04-22 13:07 ` irqchip-bot for Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: irqchip-bot for Randy Dunlap @ 2021-04-22 13:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Thomas Gleixner, Marc Zyngier, Christian Ruppert

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     a6992bbe9774e044d3d0f973593d655c53efe089
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/a6992bbe9774e044d3d0f973593d655c53efe089
Author:        Randy Dunlap <rdunlap@infradead.org>
AuthorDate:    Wed, 21 Apr 2021 22:16:20 -07:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Thu, 22 Apr 2021 13:53:33 +01:00

irqchip/tb10x: Use 'fallthrough' to eliminate a warning

Use the 'fallthrough' macro to document that this switch case
does indeed fall through to the next case.

../drivers/irqchip/irq-tb10x.c: In function 'tb10x_irq_set_type':
../drivers/irqchip/irq-tb10x.c:62:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
   62 |   flow_type = IRQ_TYPE_LEVEL_LOW;
../drivers/irqchip/irq-tb10x.c:63:2: note: here
   63 |  case IRQ_TYPE_LEVEL_LOW:
      |  ^~~~

Fixes: b06eb0173ef1 ("irqchip: Add TB10x interrupt controller driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Christian Ruppert <christian.ruppert@abilis.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210422051620.23021-1-rdunlap@infradead.org
---
 drivers/irqchip/irq-tb10x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/irq-tb10x.c b/drivers/irqchip/irq-tb10x.c
index 9e45649..9a63b02 100644
--- a/drivers/irqchip/irq-tb10x.c
+++ b/drivers/irqchip/irq-tb10x.c
@@ -60,6 +60,7 @@ static int tb10x_irq_set_type(struct irq_data *data, unsigned int flow_type)
 		break;
 	case IRQ_TYPE_NONE:
 		flow_type = IRQ_TYPE_LEVEL_LOW;
+		fallthrough;
 	case IRQ_TYPE_LEVEL_LOW:
 		mod ^= im;
 		pol ^= im;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-22 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22  5:16 [PATCH] irqchip: tb10x: use 'fallthrough' to eliminate a warning Randy Dunlap
2021-04-22 13:07 ` [irqchip: irq/irqchip-next] irqchip/tb10x: Use " irqchip-bot for Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).