All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs
@ 2018-07-05 15:51 Gustavo A. R. Silva
  2018-07-06  6:15 ` Mika Westerberg
  2018-07-09 13:42 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-05 15:51 UTC (permalink / raw)
  To: Mika Westerberg, Heikki Krogerus, Linus Walleij
  Cc: linux-gpio, linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Addresses-Coverity-ID: 1292308 ("Missing break in switch")
Addresses-Coverity-ID: 1292309 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 6b52ea1..3420e7e 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1542,11 +1542,13 @@ static void byt_irq_unmask(struct irq_data *d)
 	switch (irqd_get_trigger_type(d)) {
 	case IRQ_TYPE_LEVEL_HIGH:
 		value |= BYT_TRIG_LVL;
+		/* fall through */
 	case IRQ_TYPE_EDGE_RISING:
 		value |= BYT_TRIG_POS;
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
 		value |= BYT_TRIG_LVL;
+		/* fall through */
 	case IRQ_TYPE_EDGE_FALLING:
 		value |= BYT_TRIG_NEG;
 		break;
-- 
2.7.4

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

* Re: [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs
  2018-07-05 15:51 [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-07-06  6:15 ` Mika Westerberg
  2018-07-09 13:42 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Mika Westerberg @ 2018-07-06  6:15 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Heikki Krogerus, Linus Walleij, linux-gpio, linux-kernel

On Thu, Jul 05, 2018 at 10:51:27AM -0500, Gustavo A. R. Silva wrote:
> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Addresses-Coverity-ID: 1292308 ("Missing break in switch")
> Addresses-Coverity-ID: 1292309 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

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

* Re: [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs
  2018-07-05 15:51 [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs Gustavo A. R. Silva
  2018-07-06  6:15 ` Mika Westerberg
@ 2018-07-09 13:42 ` Linus Walleij
  2018-07-09 13:57   ` Gustavo A. R. Silva
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2018-07-09 13:42 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Mika Westerberg, Heikki Krogerus, open list:GPIO SUBSYSTEM, linux-kernel

On Thu, Jul 5, 2018 at 5:51 PM Gustavo A. R. Silva
<gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
>
> Addresses-Coverity-ID: 1292308 ("Missing break in switch")
> Addresses-Coverity-ID: 1292309 ("Missing break in switch")

I hope these special tags are accepted by the community at large.
Has there been discussion?

> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Patch applied with Mika's ACK.

Yours,
Linus Walleij

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

* Re: [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs
  2018-07-09 13:42 ` Linus Walleij
@ 2018-07-09 13:57   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 4+ messages in thread
From: Gustavo A. R. Silva @ 2018-07-09 13:57 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Mika Westerberg, Heikki Krogerus, open list:GPIO SUBSYSTEM, linux-kernel

Hi Linus,

On 07/09/2018 08:42 AM, Linus Walleij wrote:
> On Thu, Jul 5, 2018 at 5:51 PM Gustavo A. R. Silva
> <gustavo@embeddedor.com> wrote:
> 
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>>
>> Addresses-Coverity-ID: 1292308 ("Missing break in switch")
>> Addresses-Coverity-ID: 1292309 ("Missing break in switch")
> 
> I hope these special tags are accepted by the community at large.
> Has there been discussion?
> 

Yes. This is information we want to keep on the changelog:

http://lkml.iu.edu/hypermail/linux/kernel/1710.3/04013.html

>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> 
> Patch applied with Mika's ACK.
> 

Thanks
--
Gustavo

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

end of thread, other threads:[~2018-07-09 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-05 15:51 [PATCH] pinctrl: baytrail: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-07-06  6:15 ` Mika Westerberg
2018-07-09 13:42 ` Linus Walleij
2018-07-09 13:57   ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.