Commit 6d1474a9 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller

netdevsim: fix fall-through annotation

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: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4a46a7c3
...@@ -168,7 +168,7 @@ new_device_store(struct bus_type *bus, const char *buf, size_t count) ...@@ -168,7 +168,7 @@ new_device_store(struct bus_type *bus, const char *buf, size_t count)
switch (err) { switch (err) {
case 1: case 1:
port_count = 1; port_count = 1;
/* pass through */ /* fall through */
case 2: case 2:
if (id > INT_MAX) { if (id > INT_MAX) {
pr_err("Value of \"id\" is too big.\n"); pr_err("Value of \"id\" is too big.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment