lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 1 Apr 2019 15:34:49 -0500
From:   "Gustavo A. R. Silva" <>
To:     Woojung Huh <>,
        Microchip Linux Driver Support <>,
        Andrew Lunn <>,
        Vivien Didelot <>,
        Florian Fainelli <>,
        "David S. Miller" <>,
        Tristram Ha <>
        "Gustavo A. R. Silva" <>,
        Kees Cook <>
Subject: [PATCH net-next] net: dsa: microchip: mark expected switch

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

This patch fixes the following warning:

drivers/net/dsa/microchip/ksz9477.c: In function ‘ksz9477_get_interface’:
drivers/net/dsa/microchip/ksz9477.c:1145:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (gbit)
drivers/net/dsa/microchip/ksz9477.c:1147:2: note: here
  case 0:

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

This patch is part of the ongoing efforts to enable

Signed-off-by: Gustavo A. R. Silva <>
 drivers/net/dsa/microchip/ksz9477.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/microchip/ksz9477.c b/drivers/net/dsa/microchip/ksz9477.c
index f16e1d7d8615..c026d15721f6 100644
--- a/drivers/net/dsa/microchip/ksz9477.c
+++ b/drivers/net/dsa/microchip/ksz9477.c
@@ -1144,6 +1144,7 @@ static phy_interface_t ksz9477_get_interface(struct ksz_device *dev, int port)
 		if (gbit)
+		/* fall through */
 	case 0:
 		interface = PHY_INTERFACE_MODE_MII;

Powered by blists - more mailing lists