linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs
@ 2018-08-07 23:09 Gustavo A. R. Silva
  2018-08-07 23:09 ` [PATCH 01/33] 8390: axnet_cs: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (33 more replies)
  0 siblings, 34 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:09 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Solarflare linux maintainers, Edward Cree, Bert Kenward,
	Jes Sorensen, linux-acenic, Michael Chan, Nicolas Ferre,
	Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
	Ganesh Goudar, Santosh Raspatur, Sunil Goutham, Robert Richter,
	linux-arm-kernel, linux-parisc, Sathya Perla, Ajit Khaparde,
	Sriharsha Basavapatna, Somnath Kotur, Yisen Zhuang, Salil Mehta,
	Jeff Kirsher, intel-wired-lan, Tariq Toukan, linux-rdma,
	Jon Mason, Saeed Mahameed, Leon Romanovsky, Ariel Elior,
	everest-linux-l2, Manish Chopra, Rahul Verma, Dept-GELinuxNICDev,
	Harish Patil, Byungho An, Girish K S, Vipul Pandya,
	Samuel Chessman

Hi all,

In preparation to enabling -Wimplicit-fallthrough, this patchset aims
to add some annotations in order to mark switch cases where we are
expecting to fall through.

Thanks

Gustavo A. R. Silva (33):
  8390: axnet_cs: Mark expected switch fall-through
  alteon: acenic: mark expected switch fall-through
  bnx2x: Mark expected switch fall-thoughs
  net: macb: Mark expected switch fall-through
  liquidio: mark expected switch fall-through
  cxgb4/l2t: Mark expected switch fall-through
  cxgb4/t4_hw: mark expected switch fall-throughs
  cxgb3/l2t: Mark expected switch fall-through
  net: thunderx: mark expected switch fall-through
  net: tulip_core: mark expected switch fall-through
  net: tulip: de4x5: mark expected switch fall-throughs
  be2net: Mark expected switch fall-through
  net: hns: Mark expected switch fall-through
  net: hns3: Mark expected switch fall-through
  i40e_main: mark expected switch fall-through
  i40e_txrx: mark expected switch fall-through
  net/mlx4/mcg: Mark expected switch fall-throughs
  net/mlx4/en_rx: Mark expected switch fall-throughs
  igb_main: Mark expected switch fall-throughs
  igb: e1000_82575: Mark expected switch fall-through
  igb: e1000_phy: Mark expected switch fall-through
  igbvf: netdev: Mark expected switch fall-through
  vxge: Mark expected switch fall-throughs
  net/mlx5e: Mark expected switch fall-throughs
  qed: qed_dev: Mark expected switch fall-throughs
  netxen_nic: Mark expected switch fall-throughs
  qede: qede_fp: Mark expected switch fall-through
  qlcnic: Mark expected switch fall-througs
  qlge: mark expected switch fall-through
  net: ethernet: sxgbe: mark expected switch fall-throughs
  net: sfc: falcon: mark expected switch fall-through
  net: tlan: Mark expected switch fall-through
  net: ethernet: ti: cpts: mark expected switch fall-through

 drivers/net/ethernet/8390/axnet_cs.c                    | 1 +
 drivers/net/ethernet/alteon/acenic.c                    | 1 +
 drivers/net/ethernet/broadcom/bnxt/bnxt.c               | 2 +-
 drivers/net/ethernet/cadence/macb_ptp.c                 | 1 +
 drivers/net/ethernet/cavium/liquidio/lio_main.c         | 1 +
 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c     | 1 +
 drivers/net/ethernet/chelsio/cxgb3/l2t.c                | 1 +
 drivers/net/ethernet/chelsio/cxgb4/l2t.c                | 1 +
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c              | 3 +++
 drivers/net/ethernet/dec/tulip/de4x5.c                  | 6 ++++++
 drivers/net/ethernet/dec/tulip/tulip_core.c             | 1 +
 drivers/net/ethernet/emulex/benet/be_ethtool.c          | 1 +
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c        | 1 +
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c         | 1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c             | 1 +
 drivers/net/ethernet/intel/i40e/i40e_txrx.c             | 3 ++-
 drivers/net/ethernet/intel/igb/e1000_82575.c            | 1 +
 drivers/net/ethernet/intel/igb/e1000_phy.c              | 1 +
 drivers/net/ethernet/intel/igb/igb_main.c               | 2 ++
 drivers/net/ethernet/intel/igbvf/netdev.c               | 1 +
 drivers/net/ethernet/mellanox/mlx4/en_rx.c              | 2 ++
 drivers/net/ethernet/mellanox/mlx4/mcg.c                | 2 ++
 drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c        | 2 ++
 drivers/net/ethernet/neterion/vxge/vxge-config.c        | 3 +++
 drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 3 ++-
 drivers/net/ethernet/qlogic/qed/qed_dev.c               | 4 ++--
 drivers/net/ethernet/qlogic/qede/qede_fp.c              | 2 ++
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c     | 3 ++-
 drivers/net/ethernet/qlogic/qlge/qlge_mpi.c             | 1 +
 drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c      | 2 ++
 drivers/net/ethernet/sfc/falcon/ethtool.c               | 1 +
 drivers/net/ethernet/ti/cpts.c                          | 1 +
 drivers/net/ethernet/ti/tlan.c                          | 1 +
 33 files changed, 52 insertions(+), 6 deletions(-)

-- 
2.7.4


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

* [PATCH 01/33] 8390: axnet_cs: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-07 23:09 ` Gustavo A. R. Silva
  2018-08-07 23:09 ` [PATCH 02/33] alteon: acenic: mark " Gustavo A. R. Silva
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:09 UTC (permalink / raw)
  To: David S. Miller, netdev, 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: 114889 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/8390/axnet_cs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c
index d422a12..0b6bbf6 100644
--- a/drivers/net/ethernet/8390/axnet_cs.c
+++ b/drivers/net/ethernet/8390/axnet_cs.c
@@ -610,6 +610,7 @@ static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
     switch (cmd) {
     case SIOCGMIIPHY:
 	data->phy_id = info->phy_id;
+	/* Fall through */
     case SIOCGMIIREG:		/* Read MII PHY register. */
 	data->val_out = mdio_read(mii_addr, data->phy_id, data->reg_num & 0x1f);
 	return 0;
-- 
2.7.4


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

* [PATCH 02/33] alteon: acenic: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
  2018-08-07 23:09 ` [PATCH 01/33] 8390: axnet_cs: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:09 ` Gustavo A. R. Silva
  2018-08-07 23:11 ` [PATCH 03/33] bnx2x: Mark expected switch fall-thoughs Gustavo A. R. Silva
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:09 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jes Sorensen, linux-acenic

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

Addresses-Coverity-ID: 114891 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/alteon/acenic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/alteon/acenic.c b/drivers/net/ethernet/alteon/acenic.c
index 08945ba..4f11f98 100644
--- a/drivers/net/ethernet/alteon/acenic.c
+++ b/drivers/net/ethernet/alteon/acenic.c
@@ -551,6 +551,7 @@ static int acenic_probe_one(struct pci_dev *pdev,
 			       ap->name);
 			break;
 		}
+		/* Fall through */
 	case PCI_VENDOR_ID_SGI:
 		printk(KERN_INFO "%s: SGI AceNIC ", ap->name);
 		break;
-- 
2.7.4


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

* [PATCH 03/33] bnx2x: Mark expected switch fall-thoughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
  2018-08-07 23:09 ` [PATCH 01/33] 8390: axnet_cs: Mark expected switch fall-through Gustavo A. R. Silva
  2018-08-07 23:09 ` [PATCH 02/33] alteon: acenic: mark " Gustavo A. R. Silva
@ 2018-08-07 23:11 ` Gustavo A. R. Silva
  2018-08-07 23:11 ` [PATCH 04/33] net: macb: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:11 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Michael Chan

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

Addresses-Coverity-ID: 114878 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index d7f51ab..8bb1e38 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1729,8 +1729,8 @@ static int bnxt_async_event_process(struct bnxt *bp,
 					    speed);
 		}
 		set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
-		/* fall through */
 	}
+	/* fall through */
 	case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
 		set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);
 		break;
-- 
2.7.4


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

* [PATCH 04/33] net: macb: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  2018-08-07 23:11 ` [PATCH 03/33] bnx2x: Mark expected switch fall-thoughs Gustavo A. R. Silva
@ 2018-08-07 23:11 ` Gustavo A. R. Silva
  2018-08-07 23:13 ` [PATCH 05/33] liquidio: mark " Gustavo A. R. Silva
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:11 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Nicolas Ferre

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

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

diff --git a/drivers/net/ethernet/cadence/macb_ptp.c b/drivers/net/ethernet/cadence/macb_ptp.c
index 6788351..cd5296b8 100644
--- a/drivers/net/ethernet/cadence/macb_ptp.c
+++ b/drivers/net/ethernet/cadence/macb_ptp.c
@@ -466,6 +466,7 @@ int gem_set_hwtst(struct net_device *dev, struct ifreq *ifr, int cmd)
 	case HWTSTAMP_TX_ONESTEP_SYNC:
 		if (gem_ptp_set_one_step_sync(bp, 1) != 0)
 			return -ERANGE;
+		/* fall through */
 	case HWTSTAMP_TX_ON:
 		tx_bd_control = TSTAMP_ALL_FRAMES;
 		break;
-- 
2.7.4


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

* [PATCH 05/33] liquidio: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (3 preceding siblings ...)
  2018-08-07 23:11 ` [PATCH 04/33] net: macb: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:13 ` Gustavo A. R. Silva
  2018-08-07 23:13 ` [PATCH 06/33] cxgb4/l2t: Mark " Gustavo A. R. Silva
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:13 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi

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

Addresses-Coverity-ID: 143135 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 8ef87a7..6fb13fa 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -2209,6 +2209,7 @@ static int liquidio_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
 	case SIOCSHWTSTAMP:
 		if (lio->oct_dev->ptp_enable)
 			return hwtstamp_ioctl(netdev, ifr);
+		/* fall through */
 	default:
 		return -EOPNOTSUPP;
 	}
-- 
2.7.4


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

* [PATCH 06/33] cxgb4/l2t: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (4 preceding siblings ...)
  2018-08-07 23:13 ` [PATCH 05/33] liquidio: mark " Gustavo A. R. Silva
@ 2018-08-07 23:13 ` Gustavo A. R. Silva
  2018-08-07 23:13 ` [PATCH 07/33] cxgb4/t4_hw: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:13 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Ganesh Goudar

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

Addresses-Coverity-ID: 114910 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/chelsio/cxgb4/l2t.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
index 77c2c53..301c4df 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
@@ -231,6 +231,7 @@ int cxgb4_l2t_send(struct net_device *dev, struct sk_buff *skb,
 		if (e->state == L2T_STATE_STALE)
 			e->state = L2T_STATE_VALID;
 		spin_unlock_bh(&e->lock);
+		/* fall through */
 	case L2T_STATE_VALID:     /* fast-path, send the packet on */
 		return t4_ofld_send(adap, skb);
 	case L2T_STATE_RESOLVING:
-- 
2.7.4


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

* [PATCH 07/33] cxgb4/t4_hw: mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (5 preceding siblings ...)
  2018-08-07 23:13 ` [PATCH 06/33] cxgb4/l2t: Mark " Gustavo A. R. Silva
@ 2018-08-07 23:13 ` Gustavo A. R. Silva
  2018-08-07 23:14 ` [PATCH 08/33] cxgb3/l2t: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:13 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Ganesh Goudar

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

Addresses-Coverity-ID: 114777 ("Missing break in switch")
Addresses-Coverity-ID: 114778 ("Missing break in switch")
Addresses-Coverity-ID: 114779 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
index 2d9943f..5fe5d16 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
@@ -7504,10 +7504,13 @@ int t4_alloc_vi(struct adapter *adap, unsigned int mbox, unsigned int port,
 		switch (nmac) {
 		case 5:
 			memcpy(mac + 24, c.nmac3, sizeof(c.nmac3));
+			/* Fall through */
 		case 4:
 			memcpy(mac + 18, c.nmac2, sizeof(c.nmac2));
+			/* Fall through */
 		case 3:
 			memcpy(mac + 12, c.nmac1, sizeof(c.nmac1));
+			/* Fall through */
 		case 2:
 			memcpy(mac + 6,  c.nmac0, sizeof(c.nmac0));
 		}
-- 
2.7.4


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

* [PATCH 08/33] cxgb3/l2t: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (6 preceding siblings ...)
  2018-08-07 23:13 ` [PATCH 07/33] cxgb4/t4_hw: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-07 23:14 ` Gustavo A. R. Silva
  2018-08-07 23:15 ` [PATCH 09/33] net: thunderx: mark " Gustavo A. R. Silva
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:14 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Santosh Raspatur

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

Addresses-Coverity-ID: 114780 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/chelsio/cxgb3/l2t.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/chelsio/cxgb3/l2t.c b/drivers/net/ethernet/chelsio/cxgb3/l2t.c
index 248e40c..0e9182d 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/l2t.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/l2t.c
@@ -136,6 +136,7 @@ int t3_l2t_send_slow(struct t3cdev *dev, struct sk_buff *skb,
 		if (e->state == L2T_STATE_STALE)
 			e->state = L2T_STATE_VALID;
 		spin_unlock_bh(&e->lock);
+		/* fall through */
 	case L2T_STATE_VALID:	/* fast-path, send the packet on */
 		return cxgb3_ofld_send(dev, skb);
 	case L2T_STATE_RESOLVING:
-- 
2.7.4


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

* [PATCH 09/33] net: thunderx: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (7 preceding siblings ...)
  2018-08-07 23:14 ` [PATCH 08/33] cxgb3/l2t: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:15 ` Gustavo A. R. Silva
  2018-08-07 23:15 ` [PATCH 10/33] net: tulip_core: " Gustavo A. R. Silva
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:15 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Sunil Goutham, Robert Richter, linux-arm-kernel

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

Addresses-Coverity-ID: 114781 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
index 5603f5a..92ba958 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_ethtool.c
@@ -527,6 +527,7 @@ static int nicvf_get_rss_hash_opts(struct nicvf *nic,
 	case SCTP_V4_FLOW:
 	case SCTP_V6_FLOW:
 		info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+		/* Fall through */
 	case IPV4_FLOW:
 	case IPV6_FLOW:
 		info->data |= RXH_IP_SRC | RXH_IP_DST;
-- 
2.7.4


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

* [PATCH 10/33] net: tulip_core: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (8 preceding siblings ...)
  2018-08-07 23:15 ` [PATCH 09/33] net: thunderx: mark " Gustavo A. R. Silva
@ 2018-08-07 23:15 ` Gustavo A. R. Silva
  2018-08-07 23:16 ` [PATCH 11/33] net: tulip: de4x5: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:15 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: linux-parisc

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

Addresses-Coverity-ID: 114782 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/dec/tulip/tulip_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c
index 00d02a0..3e3e086 100644
--- a/drivers/net/ethernet/dec/tulip/tulip_core.c
+++ b/drivers/net/ethernet/dec/tulip/tulip_core.c
@@ -923,6 +923,7 @@ static int private_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
 			data->phy_id = 1;
 		else
 			return -ENODEV;
+		/* Fall through */
 
 	case SIOCGMIIREG:		/* Read MII PHY register. */
 		if (data->phy_id == 32 && (tp->flags & HAS_NWAY)) {
-- 
2.7.4


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

* [PATCH 11/33] net: tulip: de4x5: mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (9 preceding siblings ...)
  2018-08-07 23:15 ` [PATCH 10/33] net: tulip_core: " Gustavo A. R. Silva
@ 2018-08-07 23:16 ` Gustavo A. R. Silva
  2018-08-07 23:17 ` [PATCH 12/33] be2net: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:16 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: linux-parisc

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

Addresses-Coverity-ID: 114784 ("Missing break in switch")
Addresses-Coverity-ID: 114785 ("Missing break in switch")
Addresses-Coverity-ID: 114786 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/dec/tulip/de4x5.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c
index a31b4df..66535d1 100644
--- a/drivers/net/ethernet/dec/tulip/de4x5.c
+++ b/drivers/net/ethernet/dec/tulip/de4x5.c
@@ -3204,6 +3204,8 @@ srom_map_media(struct net_device *dev)
       case SROM_10BASETF:
 	if (!lp->params.fdx) return -1;
 	lp->fdx = true;
+	/* fall through */
+
       case SROM_10BASET:
 	if (lp->params.fdx && !lp->fdx) return -1;
 	if ((lp->chipset == DC21140) || ((lp->chipset & ~0x00ff) == DC2114x)) {
@@ -3224,6 +3226,8 @@ srom_map_media(struct net_device *dev)
       case SROM_100BASETF:
         if (!lp->params.fdx) return -1;
 	lp->fdx = true;
+	/* fall through */
+
       case SROM_100BASET:
 	if (lp->params.fdx && !lp->fdx) return -1;
 	lp->media = _100Mb;
@@ -3236,6 +3240,8 @@ srom_map_media(struct net_device *dev)
       case SROM_100BASEFF:
 	if (!lp->params.fdx) return -1;
 	lp->fdx = true;
+	/* fall through */
+
       case SROM_100BASEF:
 	if (lp->params.fdx && !lp->fdx) return -1;
 	lp->media = _100Mb;
-- 
2.7.4


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

* [PATCH 12/33] be2net: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (10 preceding siblings ...)
  2018-08-07 23:16 ` [PATCH 11/33] net: tulip: de4x5: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-07 23:17 ` Gustavo A. R. Silva
  2018-08-07 23:17 ` [PATCH 13/33] net: hns: " Gustavo A. R. Silva
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:17 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Sathya Perla, Ajit Khaparde, Sriharsha Basavapatna, Somnath Kotur

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

Addresses-Coverity-ID: 114787 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/emulex/benet/be_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 7f7e206..3f6749f 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -575,6 +575,7 @@ static u32 convert_to_et_setting(struct be_adapter *adapter, u32 if_speeds)
 				break;
 			}
 		}
+		/* fall through */
 	case PHY_TYPE_SFP_PLUS_10GB:
 	case PHY_TYPE_XFP_10GB:
 	case PHY_TYPE_SFP_1GB:
-- 
2.7.4


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

* [PATCH 13/33] net: hns: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (11 preceding siblings ...)
  2018-08-07 23:17 ` [PATCH 12/33] be2net: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:17 ` Gustavo A. R. Silva
  2018-08-07 23:18 ` [PATCH 14/33] net: hns3: " Gustavo A. R. Silva
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:17 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Yisen Zhuang, Salil Mehta

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

Addresses-Coverity-ID: 114788 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 3957205..08f3c47 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -307,6 +307,7 @@ static int __lb_setup(struct net_device *ndev,
 		break;
 	case MAC_LOOP_PHY_NONE:
 		ret = hns_nic_config_phy_loopback(phy_dev, 0x0);
+		/* fall through */
 	case MAC_LOOP_NONE:
 		if (!ret && h->dev->ops->set_loopback) {
 			if (priv->ae_handle->phy_if != PHY_INTERFACE_MODE_XGMII)
-- 
2.7.4


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

* [PATCH 14/33] net: hns3: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (12 preceding siblings ...)
  2018-08-07 23:17 ` [PATCH 13/33] net: hns: " Gustavo A. R. Silva
@ 2018-08-07 23:18 ` Gustavo A. R. Silva
  2018-08-07 23:19 ` [PATCH 15/33] i40e_main: mark " Gustavo A. R. Silva
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:18 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Yisen Zhuang, Salil Mehta

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

Addresses-Coverity-ID: 114789 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index bd031af..a64d69c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -2104,6 +2104,7 @@ static void hns3_rx_checksum(struct hns3_enet_ring *ring, struct sk_buff *skb,
 	case HNS3_OL4_TYPE_MAC_IN_UDP:
 	case HNS3_OL4_TYPE_NVGRE:
 		skb->csum_level = 1;
+		/* fall through */
 	case HNS3_OL4_TYPE_NO_TUN:
 		/* Can checksum ipv4 or ipv6 + UDP/TCP/SCTP packets */
 		if ((l3_type == HNS3_L3_TYPE_IPV4 ||
-- 
2.7.4


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

* [PATCH 15/33] i40e_main: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (13 preceding siblings ...)
  2018-08-07 23:18 ` [PATCH 14/33] net: hns3: " Gustavo A. R. Silva
@ 2018-08-07 23:19 ` Gustavo A. R. Silva
  2018-08-07 23:20 ` [PATCH 16/33] i40e_txrx: " Gustavo A. R. Silva
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:19 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jeff Kirsher, intel-wired-lan

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

Addresses-Coverity-ID: 114790 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 5176242..a1a274d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1800,6 +1800,7 @@ static void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
 						       num_tc_qps);
 					break;
 				}
+				/* fall through */
 			case I40E_VSI_FDIR:
 			case I40E_VSI_SRIOV:
 			case I40E_VSI_VMDQ2:
-- 
2.7.4


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

* [PATCH 16/33] i40e_txrx: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (14 preceding siblings ...)
  2018-08-07 23:19 ` [PATCH 15/33] i40e_main: mark " Gustavo A. R. Silva
@ 2018-08-07 23:20 ` Gustavo A. R. Silva
  2018-08-07 23:21 ` [PATCH 17/33] net/mlx4/mcg: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:20 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jeff Kirsher, intel-wired-lan

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

Addresses-Coverity-ID: 114791 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index b151ae3..b5042d1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2253,9 +2253,10 @@ static struct sk_buff *i40e_run_xdp(struct i40e_ring *rx_ring,
 		break;
 	default:
 		bpf_warn_invalid_xdp_action(act);
+		/* fall through */
 	case XDP_ABORTED:
 		trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
-		/* fallthrough -- handle aborts by dropping packet */
+		/* fall through -- handle aborts by dropping packet */
 	case XDP_DROP:
 		result = I40E_XDP_CONSUMED;
 		break;
-- 
2.7.4


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

* [PATCH 17/33] net/mlx4/mcg: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (15 preceding siblings ...)
  2018-08-07 23:20 ` [PATCH 16/33] i40e_txrx: " Gustavo A. R. Silva
@ 2018-08-07 23:21 ` Gustavo A. R. Silva
  2018-08-07 23:21 ` [PATCH 18/33] net/mlx4/en_rx: " Gustavo A. R. Silva
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:21 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Tariq Toukan, linux-rdma

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

Addresses-Coverity-ID: 114792 ("Missing break in switch")
Addresses-Coverity-ID: 114793 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/mellanox/mlx4/mcg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c
index 4c5306d..ffed2d4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -1412,6 +1412,7 @@ int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
 	case MLX4_STEERING_MODE_A0:
 		if (prot == MLX4_PROT_ETH)
 			return 0;
+		/* fall through */
 
 	case MLX4_STEERING_MODE_B0:
 		if (prot == MLX4_PROT_ETH)
@@ -1441,6 +1442,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
 	case MLX4_STEERING_MODE_A0:
 		if (prot == MLX4_PROT_ETH)
 			return 0;
+		/* fall through */
 
 	case MLX4_STEERING_MODE_B0:
 		if (prot == MLX4_PROT_ETH)
-- 
2.7.4


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

* [PATCH 18/33] net/mlx4/en_rx: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (16 preceding siblings ...)
  2018-08-07 23:21 ` [PATCH 17/33] net/mlx4/mcg: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-07 23:21 ` Gustavo A. R. Silva
  2018-08-07 23:22 ` [PATCH 19/33] igb_main: " Gustavo A. R. Silva
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:21 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Tariq Toukan, linux-rdma

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

Addresses-Coverity-ID: 114794 ("Missing break in switch")
Addresses-Coverity-ID: 114795 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_rx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 3360f7b..a1aeeb8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -795,8 +795,10 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 				goto xdp_drop_no_cnt; /* Drop on xmit failure */
 			default:
 				bpf_warn_invalid_xdp_action(act);
+				/* fall through */
 			case XDP_ABORTED:
 				trace_xdp_exception(dev, xdp_prog, act);
+				/* fall through */
 			case XDP_DROP:
 				ring->xdp_drop++;
 xdp_drop_no_cnt:
-- 
2.7.4


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

* [PATCH 19/33] igb_main: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (17 preceding siblings ...)
  2018-08-07 23:21 ` [PATCH 18/33] net/mlx4/en_rx: " Gustavo A. R. Silva
@ 2018-08-07 23:22 ` Gustavo A. R. Silva
  2018-08-07 23:22 ` [PATCH 20/33] igb: e1000_82575: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:22 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jeff Kirsher, intel-wired-lan

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

Addresses-Coverity-ID: 200521 ("Missing break in switch")
Addresses-Coverity-ID: 114797 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 636d805..d03c2f0 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -5175,6 +5175,7 @@ bool igb_has_link(struct igb_adapter *adapter)
 	case e1000_media_type_copper:
 		if (!hw->mac.get_link_status)
 			return true;
+		/* fall through */
 	case e1000_media_type_internal_serdes:
 		hw->mac.ops.check_for_link(hw);
 		link_active = !hw->mac.get_link_status;
@@ -5835,6 +5836,7 @@ static void igb_tx_csum(struct igb_ring *tx_ring, struct igb_tx_buffer *first)
 			type_tucmd = E1000_ADVTXD_TUCMD_L4T_SCTP;
 			break;
 		}
+		/* fall through */
 	default:
 		skb_checksum_help(skb);
 		goto csum_failed;
-- 
2.7.4


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

* [PATCH 20/33] igb: e1000_82575: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (18 preceding siblings ...)
  2018-08-07 23:22 ` [PATCH 19/33] igb_main: " Gustavo A. R. Silva
@ 2018-08-07 23:22 ` Gustavo A. R. Silva
  2018-08-07 23:23 ` [PATCH 21/33] igb: e1000_phy: " Gustavo A. R. Silva
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:22 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jeff Kirsher, intel-wired-lan

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

Addresses-Coverity-ID: 114799 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/intel/igb/e1000_82575.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
index a795c07..bafdcf7 100644
--- a/drivers/net/ethernet/intel/igb/e1000_82575.c
+++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
@@ -1708,6 +1708,7 @@ static s32 igb_setup_serdes_link_82575(struct e1000_hw *hw)
 	case E1000_CTRL_EXT_LINK_MODE_1000BASE_KX:
 		/* disable PCS autoneg and support parallel detect only */
 		pcs_autoneg = false;
+		/* fall through */
 	default:
 		if (hw->mac.type == e1000_82575 ||
 		    hw->mac.type == e1000_82576) {
-- 
2.7.4


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

* [PATCH 21/33] igb: e1000_phy: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (19 preceding siblings ...)
  2018-08-07 23:22 ` [PATCH 20/33] igb: e1000_82575: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:23 ` Gustavo A. R. Silva
  2018-08-07 23:24 ` [PATCH 22/33] igbvf: netdev: " Gustavo A. R. Silva
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:23 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jeff Kirsher, intel-wired-lan

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

Addresses-Coverity-ID: 114800 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/intel/igb/e1000_phy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
index 2be0e76..ad2125e 100644
--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
@@ -659,6 +659,7 @@ s32 igb_copper_link_setup_m88_gen2(struct e1000_hw *hw)
 			phy_data |= M88E1000_PSCR_AUTO_X_1000T;
 			break;
 		}
+		/* fall through */
 	case 0:
 	default:
 		phy_data |= M88E1000_PSCR_AUTO_X_MODE;
-- 
2.7.4


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

* [PATCH 22/33] igbvf: netdev: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (20 preceding siblings ...)
  2018-08-07 23:23 ` [PATCH 21/33] igb: e1000_phy: " Gustavo A. R. Silva
@ 2018-08-07 23:24 ` Gustavo A. R. Silva
  2018-08-07 23:24 ` [PATCH 23/33] vxge: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:24 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Jeff Kirsher, intel-wired-lan

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

Addresses-Coverity-ID: 114801 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/intel/igbvf/netdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index f818f06..e0c989f 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2102,6 +2102,7 @@ static bool igbvf_tx_csum(struct igbvf_ring *tx_ring, struct sk_buff *skb,
 			type_tucmd = E1000_ADVTXD_TUCMD_L4T_SCTP;
 			break;
 		}
+		/* fall through */
 	default:
 		skb_checksum_help(skb);
 		goto csum_failed;
-- 
2.7.4


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

* [PATCH 23/33] vxge: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (21 preceding siblings ...)
  2018-08-07 23:24 ` [PATCH 22/33] igbvf: netdev: " Gustavo A. R. Silva
@ 2018-08-07 23:24 ` Gustavo A. R. Silva
  2018-08-07 23:25 ` [PATCH 24/33] net/mlx5e: " Gustavo A. R. Silva
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:24 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva; +Cc: Jon Mason

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

Addresses-Coverity-ID: 114796 ("Missing break in switch")
Addresses-Coverity-ID: 114804 ("Missing break in switch")
Addresses-Coverity-ID: 114806 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/neterion/vxge/vxge-config.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/neterion/vxge/vxge-config.c b/drivers/net/ethernet/neterion/vxge/vxge-config.c
index a2c0a93..ae81498 100644
--- a/drivers/net/ethernet/neterion/vxge/vxge-config.c
+++ b/drivers/net/ethernet/neterion/vxge/vxge-config.c
@@ -3783,17 +3783,20 @@ vxge_hw_rts_rth_data0_data1_get(u32 j, u64 *data0, u64 *data1,
 			VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM0_ENTRY_EN |
 			VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM0_BUCKET_DATA(
 			itable[j]);
+		/* fall through */
 	case 2:
 		*data0 |=
 			VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM1_BUCKET_NUM(j)|
 			VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM1_ENTRY_EN |
 			VXGE_HW_RTS_ACCESS_STEER_DATA0_RTH_ITEM1_BUCKET_DATA(
 			itable[j]);
+		/* fall through */
 	case 3:
 		*data1 = VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM0_BUCKET_NUM(j)|
 			VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM0_ENTRY_EN |
 			VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM0_BUCKET_DATA(
 			itable[j]);
+		/* fall through */
 	case 4:
 		*data1 |=
 			VXGE_HW_RTS_ACCESS_STEER_DATA1_RTH_ITEM1_BUCKET_NUM(j)|
-- 
2.7.4


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

* [PATCH 24/33] net/mlx5e: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (22 preceding siblings ...)
  2018-08-07 23:24 ` [PATCH 23/33] vxge: Mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-07 23:25 ` Gustavo A. R. Silva
  2018-08-08 22:26   ` Saeed Mahameed
  2018-08-07 23:25 ` [PATCH 25/33] qed: qed_dev: " Gustavo A. R. Silva
                   ` (9 subsequent siblings)
  33 siblings, 1 reply; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:25 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Saeed Mahameed, Leon Romanovsky, linux-rdma

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

Addresses-Coverity-ID: 114808 ("Missing break in switch")
Addresses-Coverity-ID: 114802 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
index 1881468..ad6d471 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
@@ -91,9 +91,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
 		return true;
 	default:
 		bpf_warn_invalid_xdp_action(act);
+		/* fall through */
 	case XDP_ABORTED:
 xdp_abort:
 		trace_xdp_exception(rq->netdev, prog, act);
+		/* fall through */
 	case XDP_DROP:
 		rq->stats->xdp_drop++;
 		return true;
-- 
2.7.4


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

* [PATCH 25/33] qed: qed_dev: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (23 preceding siblings ...)
  2018-08-07 23:25 ` [PATCH 24/33] net/mlx5e: " Gustavo A. R. Silva
@ 2018-08-07 23:25 ` Gustavo A. R. Silva
  2018-08-07 23:26 ` [PATCH 26/33] netxen_nic: " Gustavo A. R. Silva
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:25 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Ariel Elior, everest-linux-l2

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

Notice that in this particular case, I replaced the code comments with
a proper "fall through" annotation, which is what GCC is expecting
to find.

Addresses-Coverity-ID: 114809 ("Missing break in switch")
Addresses-Coverity-ID: 114810 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 6a0b46f..2f42df3 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -1709,14 +1709,14 @@ int qed_hw_init(struct qed_dev *cdev, struct qed_hw_init_params *p_params)
 						p_hwfn->hw_info.hw_mode);
 			if (rc)
 				break;
-		/* Fall into */
+		/* Fall through */
 		case FW_MSG_CODE_DRV_LOAD_PORT:
 			rc = qed_hw_init_port(p_hwfn, p_hwfn->p_main_ptt,
 					      p_hwfn->hw_info.hw_mode);
 			if (rc)
 				break;
 
-		/* Fall into */
+		/* Fall through */
 		case FW_MSG_CODE_DRV_LOAD_FUNCTION:
 			rc = qed_hw_init_pf(p_hwfn, p_hwfn->p_main_ptt,
 					    p_params->p_tunn,
-- 
2.7.4


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

* [PATCH 26/33] netxen_nic: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (24 preceding siblings ...)
  2018-08-07 23:25 ` [PATCH 25/33] qed: qed_dev: " Gustavo A. R. Silva
@ 2018-08-07 23:26 ` Gustavo A. R. Silva
  2018-08-07 23:27 ` [PATCH 27/33] qede: qede_fp: Mark expected switch fall-through Gustavo A. R. Silva
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:26 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Manish Chopra, Rahul Verma, Dept-GELinuxNICDev

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

Addresses-Coverity-ID: 1410182 ("Missing break in switch")
Addresses-Coverity-ID: 1410183 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
index 3157f97..3c1be87 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_ethtool.c
@@ -167,9 +167,9 @@ netxen_nic_get_link_ksettings(struct net_device *dev,
 	case NETXEN_BRDTYPE_P3_REF_QG:
 	case NETXEN_BRDTYPE_P3_4_GB:
 	case NETXEN_BRDTYPE_P3_4_GB_MM:
-
 		supported |= SUPPORTED_Autoneg;
 		advertising |= ADVERTISED_Autoneg;
+		/* fall through */
 	case NETXEN_BRDTYPE_P2_SB31_10G_CX4:
 	case NETXEN_BRDTYPE_P3_10G_CX4:
 	case NETXEN_BRDTYPE_P3_10G_CX4_LP:
@@ -198,6 +198,7 @@ netxen_nic_get_link_ksettings(struct net_device *dev,
 		supported |= SUPPORTED_TP;
 		check_sfp_module = netif_running(dev) &&
 			adapter->has_link_events;
+		/* fall through */
 	case NETXEN_BRDTYPE_P2_SB31_10G:
 	case NETXEN_BRDTYPE_P3_10G_XFP:
 		supported |= SUPPORTED_FIBRE;
-- 
2.7.4


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

* [PATCH 27/33] qede: qede_fp: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (25 preceding siblings ...)
  2018-08-07 23:26 ` [PATCH 26/33] netxen_nic: " Gustavo A. R. Silva
@ 2018-08-07 23:27 ` Gustavo A. R. Silva
  2018-08-07 23:28 ` [PATCH 28/33] qlcnic: Mark expected switch fall-througs Gustavo A. R. Silva
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:27 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Ariel Elior, everest-linux-l2

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

Addresses-Coverity-ID: 1384501 ("Missing break in switch")
Addresses-Coverity-ID: 1398869 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/qlogic/qede/qede_fp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c
index 6c70239..8c9e95b 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_fp.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c
@@ -1119,8 +1119,10 @@ static bool qede_rx_xdp(struct qede_dev *edev,
 
 	default:
 		bpf_warn_invalid_xdp_action(act);
+		/* Fall through */
 	case XDP_ABORTED:
 		trace_xdp_exception(edev->ndev, prog, act);
+		/* Fall through */
 	case XDP_DROP:
 		qede_recycle_rx_bd_ring(rxq, cqe->bd_num);
 	}
-- 
2.7.4


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

* [PATCH 28/33] qlcnic: Mark expected switch fall-througs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (26 preceding siblings ...)
  2018-08-07 23:27 ` [PATCH 27/33] qede: qede_fp: Mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:28 ` Gustavo A. R. Silva
  2018-08-07 23:29 ` [PATCH 29/33] qlge: mark expected switch fall-through Gustavo A. R. Silva
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:28 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Harish Patil, Manish Chopra, Dept-GELinuxNICDev

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

Addresses-Coverity-ID: 1410181 ("Missing break in switch")
Addresses-Coverity-ID: 1410184 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
index 7f7deea..3b0adda 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
@@ -351,9 +351,9 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
 	case QLCNIC_BRDTYPE_P3P_REF_QG:
 	case QLCNIC_BRDTYPE_P3P_4_GB:
 	case QLCNIC_BRDTYPE_P3P_4_GB_MM:
-
 		supported |= SUPPORTED_Autoneg;
 		advertising |= ADVERTISED_Autoneg;
+		/* fall through */
 	case QLCNIC_BRDTYPE_P3P_10G_CX4:
 	case QLCNIC_BRDTYPE_P3P_10G_CX4_LP:
 	case QLCNIC_BRDTYPE_P3P_10000_BASE_T:
@@ -377,6 +377,7 @@ static int qlcnic_82xx_get_link_ksettings(struct qlcnic_adapter *adapter,
 		supported |= SUPPORTED_TP;
 		check_sfp_module = netif_running(adapter->netdev) &&
 				   ahw->has_link_events;
+		/* fall through */
 	case QLCNIC_BRDTYPE_P3P_10G_XFP:
 		supported |= SUPPORTED_FIBRE;
 		advertising |= ADVERTISED_FIBRE;
-- 
2.7.4


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

* [PATCH 29/33] qlge: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (27 preceding siblings ...)
  2018-08-07 23:28 ` [PATCH 28/33] qlcnic: Mark expected switch fall-througs Gustavo A. R. Silva
@ 2018-08-07 23:29 ` Gustavo A. R. Silva
  2018-08-07 23:30 ` [PATCH 30/33] net: ethernet: sxgbe: mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:29 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Harish Patil, Manish Chopra, Dept-GELinuxNICDev

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

Addresses-Coverity-ID: 114811 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/qlogic/qlge/qlge_mpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
index 4be65d6..957c729 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_mpi.c
@@ -1176,6 +1176,7 @@ void ql_mpi_idc_work(struct work_struct *work)
 	case MB_CMD_PORT_RESET:
 	case MB_CMD_STOP_FW:
 		ql_link_off(qdev);
+		/* Fall through */
 	case MB_CMD_SET_PORT_CFG:
 		/* Signal the resulting link up AEN
 		 * that the frame routing and mac addr
-- 
2.7.4


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

* [PATCH 30/33] net: ethernet: sxgbe: mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (28 preceding siblings ...)
  2018-08-07 23:29 ` [PATCH 29/33] qlge: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:30 ` Gustavo A. R. Silva
  2018-08-07 23:31 ` [PATCH 31/33] net: sfc: falcon: mark expected switch fall-through Gustavo A. R. Silva
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:30 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Byungho An, Girish K S, Vipul Pandya

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

Addresses-Coverity-ID: 1357414 ("Missing break in switch")
Addresses-Coverity-ID: 1357415 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
index 542b67d..c9aad0e 100644
--- a/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
+++ b/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
@@ -319,6 +319,7 @@ static int sxgbe_get_rss_hash_opts(struct sxgbe_priv_data *priv,
 	case TCP_V4_FLOW:
 	case UDP_V4_FLOW:
 		cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+		/* Fall through */
 	case SCTP_V4_FLOW:
 	case AH_ESP_V4_FLOW:
 	case AH_V4_FLOW:
@@ -329,6 +330,7 @@ static int sxgbe_get_rss_hash_opts(struct sxgbe_priv_data *priv,
 	case TCP_V6_FLOW:
 	case UDP_V6_FLOW:
 		cmd->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+		/* Fall through */
 	case SCTP_V6_FLOW:
 	case AH_ESP_V6_FLOW:
 	case AH_V6_FLOW:
-- 
2.7.4


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

* [PATCH 31/33] net: sfc: falcon: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (29 preceding siblings ...)
  2018-08-07 23:30 ` [PATCH 30/33] net: ethernet: sxgbe: mark expected switch fall-throughs Gustavo A. R. Silva
@ 2018-08-07 23:31 ` Gustavo A. R. Silva
  2018-08-07 23:31 ` [PATCH 32/33] net: tlan: Mark " Gustavo A. R. Silva
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:31 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Solarflare linux maintainers, Edward Cree, Bert Kenward

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

Addresses-Coverity-ID: 1384500 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/sfc/falcon/ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/sfc/falcon/ethtool.c b/drivers/net/ethernet/sfc/falcon/ethtool.c
index 5604915..1ccdb7a 100644
--- a/drivers/net/ethernet/sfc/falcon/ethtool.c
+++ b/drivers/net/ethernet/sfc/falcon/ethtool.c
@@ -963,6 +963,7 @@ ef4_ethtool_get_rxnfc(struct net_device *net_dev,
 		switch (info->flow_type) {
 		case TCP_V4_FLOW:
 			info->data |= RXH_L4_B_0_1 | RXH_L4_B_2_3;
+			/* Fall through */
 		case UDP_V4_FLOW:
 		case SCTP_V4_FLOW:
 		case AH_ESP_V4_FLOW:
-- 
2.7.4


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

* [PATCH 32/33] net: tlan: Mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (30 preceding siblings ...)
  2018-08-07 23:31 ` [PATCH 31/33] net: sfc: falcon: mark expected switch fall-through Gustavo A. R. Silva
@ 2018-08-07 23:31 ` Gustavo A. R. Silva
  2018-08-07 23:32 ` [PATCH 33/33] net: ethernet: ti: cpts: mark " Gustavo A. R. Silva
  2018-08-08  0:59 ` [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs David Miller
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:31 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel, Gustavo A. R. Silva
  Cc: Samuel Chessman

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

Addresses-Coverity-ID: 141440 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/ti/tlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c
index c769cd9..93d1428 100644
--- a/drivers/net/ethernet/ti/tlan.c
+++ b/drivers/net/ethernet/ti/tlan.c
@@ -966,6 +966,7 @@ static int tlan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 	switch (cmd) {
 	case SIOCGMIIPHY:		/* get address of MII PHY in use. */
 		data->phy_id = phy;
+		/* fall through */
 
 
 	case SIOCGMIIREG:		/* read MII PHY register. */
-- 
2.7.4


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

* [PATCH 33/33] net: ethernet: ti: cpts: mark expected switch fall-through
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (31 preceding siblings ...)
  2018-08-07 23:31 ` [PATCH 32/33] net: tlan: Mark " Gustavo A. R. Silva
@ 2018-08-07 23:32 ` Gustavo A. R. Silva
  2018-08-08  0:59 ` [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs David Miller
  33 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-07 23:32 UTC (permalink / raw)
  To: David S. Miller, netdev, 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: 114813 ("Missing break in switch")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/ethernet/ti/cpts.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index b4ea58d..b96b93c 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -161,6 +161,7 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
 				 */
 				break;
 			}
+			/* fall through */
 		case CPTS_EV_PUSH:
 		case CPTS_EV_RX:
 			list_del_init(&event->list);
-- 
2.7.4


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

* Re: [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs
  2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
                   ` (32 preceding siblings ...)
  2018-08-07 23:32 ` [PATCH 33/33] net: ethernet: ti: cpts: mark " Gustavo A. R. Silva
@ 2018-08-08  0:59 ` David Miller
  2018-08-08 16:26   ` Gustavo A. R. Silva
  33 siblings, 1 reply; 37+ messages in thread
From: David Miller @ 2018-08-08  0:59 UTC (permalink / raw)
  To: gustavo
  Cc: netdev, linux-kernel, linux-net-drivers, ecree, bkenward, jes,
	linux-acenic, michael.chan, nicolas.ferre, derek.chickles,
	satananda.burla, felix.manlunas, raghu.vatsavayi, ganeshgr,
	santosh, sgoutham, rric, linux-arm-kernel, linux-parisc,
	sathya.perla, ajit.khaparde, sriharsha.basavapatna,
	somnath.kotur, yisen.zhuang, salil.mehta, jeffrey.t.kirsher,
	intel-wired-lan, tariqt, linux-rdma, jdmason, saeedm, leon,
	Ariel.Elior, everest-linux-l2, manish.chopra, rahul.verma,
	Dept-GELinuxNICDev, harish.patil, bh74.an, ks.giri, vipul.pandya,
	chessman

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Date: Tue, 7 Aug 2018 18:09:00 -0500

> In preparation to enabling -Wimplicit-fallthrough, this patchset aims
> to add some annotations in order to mark switch cases where we are
> expecting to fall through.

Ok, I went through all of these and they look good.

If any are not correct we can revert/fix.

Series applied, thanks.

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

* Re: [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs
  2018-08-08  0:59 ` [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs David Miller
@ 2018-08-08 16:26   ` Gustavo A. R. Silva
  0 siblings, 0 replies; 37+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-08 16:26 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, linux-kernel, linux-net-drivers, ecree, bkenward, jes,
	linux-acenic, michael.chan, nicolas.ferre, derek.chickles,
	satananda.burla, felix.manlunas, raghu.vatsavayi, ganeshgr,
	santosh, sgoutham, rric, linux-arm-kernel, linux-parisc,
	sathya.perla, ajit.khaparde, sriharsha.basavapatna,
	somnath.kotur, yisen.zhuang, salil.mehta, jeffrey.t.kirsher,
	intel-wired-lan, tariqt, linux-rdma, jdmason, saeedm, leon,
	Ariel.Elior, everest-linux-l2, manish.chopra, rahul.verma,
	Dept-GELinuxNICDev, harish.patil, bh74.an, ks.giri, vipul.pandya,
	chessman



On 8/7/18 7:59 PM, David Miller wrote:
> From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
> Date: Tue, 7 Aug 2018 18:09:00 -0500
> 
>> In preparation to enabling -Wimplicit-fallthrough, this patchset aims
>> to add some annotations in order to mark switch cases where we are
>> expecting to fall through.
> 
> Ok, I went through all of these and they look good.
> 
> If any are not correct we can revert/fix.
> 

Yep. If anything is reported, I'll take a look right away.

> Series applied, thanks.
> 

Thanks
--
Gustavo

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

* Re: [PATCH 24/33] net/mlx5e: Mark expected switch fall-throughs
  2018-08-07 23:25 ` [PATCH 24/33] net/mlx5e: " Gustavo A. R. Silva
@ 2018-08-08 22:26   ` Saeed Mahameed
  0 siblings, 0 replies; 37+ messages in thread
From: Saeed Mahameed @ 2018-08-08 22:26 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: David S. Miller, Linux Netdev List, linux-kernel, Saeed Mahameed,
	Leon Romanovsky, RDMA mailing list

On Tue, Aug 7, 2018 at 4:25 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: 114808 ("Missing break in switch")
> Addresses-Coverity-ID: 114802 ("Missing break in switch")
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>

Acked-by: Saeed Mahameed <saeedm@mellanox.com>

> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> index 1881468..ad6d471 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> @@ -91,9 +91,11 @@ bool mlx5e_xdp_handle(struct mlx5e_rq *rq, struct mlx5e_dma_info *di,
>                 return true;
>         default:
>                 bpf_warn_invalid_xdp_action(act);
> +               /* fall through */
>         case XDP_ABORTED:
>  xdp_abort:
>                 trace_xdp_exception(rq->netdev, prog, act);
> +               /* fall through */
>         case XDP_DROP:
>                 rq->stats->xdp_drop++;
>                 return true;
> --
> 2.7.4
>

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

end of thread, other threads:[~2018-08-08 22:26 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 23:09 [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-07 23:09 ` [PATCH 01/33] 8390: axnet_cs: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:09 ` [PATCH 02/33] alteon: acenic: mark " Gustavo A. R. Silva
2018-08-07 23:11 ` [PATCH 03/33] bnx2x: Mark expected switch fall-thoughs Gustavo A. R. Silva
2018-08-07 23:11 ` [PATCH 04/33] net: macb: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:13 ` [PATCH 05/33] liquidio: mark " Gustavo A. R. Silva
2018-08-07 23:13 ` [PATCH 06/33] cxgb4/l2t: Mark " Gustavo A. R. Silva
2018-08-07 23:13 ` [PATCH 07/33] cxgb4/t4_hw: mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-07 23:14 ` [PATCH 08/33] cxgb3/l2t: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:15 ` [PATCH 09/33] net: thunderx: mark " Gustavo A. R. Silva
2018-08-07 23:15 ` [PATCH 10/33] net: tulip_core: " Gustavo A. R. Silva
2018-08-07 23:16 ` [PATCH 11/33] net: tulip: de4x5: mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-07 23:17 ` [PATCH 12/33] be2net: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:17 ` [PATCH 13/33] net: hns: " Gustavo A. R. Silva
2018-08-07 23:18 ` [PATCH 14/33] net: hns3: " Gustavo A. R. Silva
2018-08-07 23:19 ` [PATCH 15/33] i40e_main: mark " Gustavo A. R. Silva
2018-08-07 23:20 ` [PATCH 16/33] i40e_txrx: " Gustavo A. R. Silva
2018-08-07 23:21 ` [PATCH 17/33] net/mlx4/mcg: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-07 23:21 ` [PATCH 18/33] net/mlx4/en_rx: " Gustavo A. R. Silva
2018-08-07 23:22 ` [PATCH 19/33] igb_main: " Gustavo A. R. Silva
2018-08-07 23:22 ` [PATCH 20/33] igb: e1000_82575: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:23 ` [PATCH 21/33] igb: e1000_phy: " Gustavo A. R. Silva
2018-08-07 23:24 ` [PATCH 22/33] igbvf: netdev: " Gustavo A. R. Silva
2018-08-07 23:24 ` [PATCH 23/33] vxge: Mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-07 23:25 ` [PATCH 24/33] net/mlx5e: " Gustavo A. R. Silva
2018-08-08 22:26   ` Saeed Mahameed
2018-08-07 23:25 ` [PATCH 25/33] qed: qed_dev: " Gustavo A. R. Silva
2018-08-07 23:26 ` [PATCH 26/33] netxen_nic: " Gustavo A. R. Silva
2018-08-07 23:27 ` [PATCH 27/33] qede: qede_fp: Mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:28 ` [PATCH 28/33] qlcnic: Mark expected switch fall-througs Gustavo A. R. Silva
2018-08-07 23:29 ` [PATCH 29/33] qlge: mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:30 ` [PATCH 30/33] net: ethernet: sxgbe: mark expected switch fall-throughs Gustavo A. R. Silva
2018-08-07 23:31 ` [PATCH 31/33] net: sfc: falcon: mark expected switch fall-through Gustavo A. R. Silva
2018-08-07 23:31 ` [PATCH 32/33] net: tlan: Mark " Gustavo A. R. Silva
2018-08-07 23:32 ` [PATCH 33/33] net: ethernet: ti: cpts: mark " Gustavo A. R. Silva
2018-08-08  0:59 ` [PATCH 00/33] net: ethernet: Mark expected switch fall-throughs David Miller
2018-08-08 16:26   ` Gustavo A. R. Silva

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).