All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] netdevsim: fix fall-through annotation
@ 2019-04-29 17:38 Gustavo A. R. Silva
  2019-04-30  0:40 ` Jakub Kicinski
  2019-05-01 15:37 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2019-04-29 17:38 UTC (permalink / raw)
  To: Jakub Kicinski, David S. Miller; +Cc: netdev, linux-kernel, Gustavo A. R. Silva

Replace "pass through" with a proper "fall through" annotation
in order to fix the following warning:

drivers/net/netdevsim/bus.c: In function ‘new_device_store’:
drivers/net/netdevsim/bus.c:170:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
   port_count = 1;
   ~~~~~~~~~~~^~~
drivers/net/netdevsim/bus.c:172:2: note: here
  case 2:
  ^~~~

Warning level 3 was used: -Wimplicit-fallthrough=3

This fix is part of the ongoing efforts to enable
-Wimplicit-fallthrough

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/netdevsim/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c
index ae482347b67b..fd68eeac574c 100644
--- a/drivers/net/netdevsim/bus.c
+++ b/drivers/net/netdevsim/bus.c
@@ -168,7 +168,7 @@ new_device_store(struct bus_type *bus, const char *buf, size_t count)
 	switch (err) {
 	case 1:
 		port_count = 1;
-		/* pass through */
+		/* fall through */
 	case 2:
 		if (id > INT_MAX) {
 			pr_err("Value of \"id\" is too big.\n");
-- 
2.21.0


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

* Re: [PATCH net-next] netdevsim: fix fall-through annotation
  2019-04-29 17:38 [PATCH net-next] netdevsim: fix fall-through annotation Gustavo A. R. Silva
@ 2019-04-30  0:40 ` Jakub Kicinski
  2019-05-01 15:37 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2019-04-30  0:40 UTC (permalink / raw)
  To: Gustavo A. R. Silva; +Cc: David S. Miller, netdev, linux-kernel

On Mon, 29 Apr 2019 12:38:07 -0500, Gustavo A. R. Silva wrote:
> Replace "pass through" with a proper "fall through" annotation
> in order to fix the following warning:
> 
> drivers/net/netdevsim/bus.c: In function ‘new_device_store’:
> drivers/net/netdevsim/bus.c:170:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    port_count = 1;
>    ~~~~~~~~~~~^~~
> drivers/net/netdevsim/bus.c:172:2: note: here
>   case 2:
>   ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This fix is part of the ongoing efforts to enable
> -Wimplicit-fallthrough
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

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

* Re: [PATCH net-next] netdevsim: fix fall-through annotation
  2019-04-29 17:38 [PATCH net-next] netdevsim: fix fall-through annotation Gustavo A. R. Silva
  2019-04-30  0:40 ` Jakub Kicinski
@ 2019-05-01 15:37 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-05-01 15:37 UTC (permalink / raw)
  To: gustavo; +Cc: jakub.kicinski, netdev, linux-kernel

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Mon, 29 Apr 2019 12:38:07 -0500

> Replace "pass through" with a proper "fall through" annotation
> in order to fix the following warning:
> 
> drivers/net/netdevsim/bus.c: In function ‘new_device_store’:
> drivers/net/netdevsim/bus.c:170:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
>    port_count = 1;
>    ~~~~~~~~~~~^~~
> drivers/net/netdevsim/bus.c:172:2: note: here
>   case 2:
>   ^~~~
> 
> Warning level 3 was used: -Wimplicit-fallthrough=3
> 
> This fix is part of the ongoing efforts to enable
> -Wimplicit-fallthrough
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Applied.

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

end of thread, other threads:[~2019-05-01 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 17:38 [PATCH net-next] netdevsim: fix fall-through annotation Gustavo A. R. Silva
2019-04-30  0:40 ` Jakub Kicinski
2019-05-01 15:37 ` David Miller

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.