Skip to contentSkip to conversation

nfp: Fix fall-through warnings for Clang

PATCH RESEND Superseded Gustavo A. R. Silva 3 participants 5 messages Mar 5, 2021 – May 18, 2021

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 nfp: Fix fall-through warnings for Clang

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

---
 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +1 -0
index b3cabc274121..3b8e675087de 100644
@@ -103,6 +103,7 @@ nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
 	case NFP_PORT_PF_PORT:
 	case NFP_PORT_VF_PORT:
 		nfp_repr_vnic_get_stats64(repr->port, stats);
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

Thanks Gustavo,

this looks good to me.

Quoted 19 lines
---
 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +1 -0
index b3cabc274121..3b8e675087de 100644
@@ -103,6 +103,7 @@ nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
 	case NFP_PORT_PF_PORT:
 	case NFP_PORT_VF_PORT:
 		nfp_repr_vnic_get_stats64(repr->port, stats);
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
#2 lore raw

Hi all,

Friendly ping: who can take this, please?

Thanks
--
Gustavo

Quoted 33 lines · Simon Horman
Quoted 6 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

Thanks Gustavo,

this looks good to me.

Quoted 19 lines
---
 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +1 -0
index b3cabc274121..3b8e675087de 100644
@@ -103,6 +103,7 @@ nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
 	case NFP_PORT_PF_PORT:
 	case NFP_PORT_VF_PORT:
 		nfp_repr_vnic_get_stats64(repr->port, stats);
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
#3 lore raw
Quoted 11 lines · Gustavo A. R. Silva
Quoted 10 lines · Simon Horman
Quoted 6 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

Thanks Gustavo,

Quoted 7 lines
Quoted 3 lines

this looks good to me.

Hi all,

Friendly ping: who can take this, please?

Hi Jakub, Hi David,

I'm happy to repost this patch if it would help with your processes.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
---
 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +1 -0
index b3cabc274121..3b8e675087de 100644
@@ -103,6 +103,7 @@ nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
 	case NFP_PORT_PF_PORT:
 	case NFP_PORT_VF_PORT:
 		nfp_repr_vnic_get_stats64(repr->port, stats);
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0
#4 lore raw

Hi all,

I'm taking this in my -next[1] branch for v5.14.

Thanks
--
Gustavo

[1] https://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux.git/log/?h=for-next/kspp

Quoted 43 lines · Simon Horman
Quoted 11 lines · Gustavo A. R. Silva
Quoted 10 lines · Simon Horman
Quoted 6 lines · Gustavo A. R. Silva

In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case.

Thanks Gustavo,

Quoted 7 lines
Quoted 3 lines

this looks good to me.

Hi all,

Friendly ping: who can take this, please?

Hi Jakub, Hi David,

I'm happy to repost this patch if it would help with your processes.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
---
 drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +1 -0
index b3cabc274121..3b8e675087de 100644
@@ -103,6 +103,7 @@ nfp_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats)
 	case NFP_PORT_PF_PORT:
 	case NFP_PORT_VF_PORT:
 		nfp_repr_vnic_get_stats64(repr->port, stats);
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.27.0