* [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 7:01 ` Leon Romanovsky
2020-03-12 6:23 ` David Miller
2020-03-11 4:51 ` [PATCH -next 002/491] MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER: " Joe Perches
` (29 subsequent siblings)
30 siblings, 2 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Boris Pismenny
Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, netdev,
linux-rdma, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
index f260dd..42978f8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
@@ -466,7 +466,7 @@ struct sk_buff *mlx5e_ktls_handle_tx_skb(struct net_device *netdev,
if (likely(!skb->decrypted))
goto out;
WARN_ON_ONCE(1);
- /* fall-through */
+ fallthrough;
default: /* MLX5E_KTLS_SYNC_FAIL */
goto err_out;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
index 6102113..d35bbc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
@@ -339,14 +339,14 @@ static void mlx5_fpga_conn_handle_cqe(struct mlx5_fpga_conn *conn,
switch (opcode) {
case MLX5_CQE_REQ_ERR:
status = ((struct mlx5_err_cqe *)cqe)->syndrome;
- /* Fall through */
+ fallthrough;
case MLX5_CQE_REQ:
mlx5_fpga_conn_sq_cqe(conn, cqe, status);
break;
case MLX5_CQE_RESP_ERR:
status = ((struct mlx5_err_cqe *)cqe)->syndrome;
- /* Fall through */
+ fallthrough;
case MLX5_CQE_RESP_SEND:
mlx5_fpga_conn_rq_cqe(conn, cqe, status);
break;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough; Joe Perches
@ 2020-03-11 7:01 ` Leon Romanovsky
2020-03-12 6:23 ` David Miller
1 sibling, 0 replies; 84+ messages in thread
From: Leon Romanovsky @ 2020-03-11 7:01 UTC (permalink / raw)
To: Joe Perches
Cc: Boris Pismenny, Saeed Mahameed, David S. Miller, netdev,
linux-rdma, linux-kernel
On Tue, Mar 10, 2020 at 09:51:15PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c | 2 +-
> drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough; Joe Perches
2020-03-11 7:01 ` Leon Romanovsky
@ 2020-03-12 6:23 ` David Miller
2020-03-12 6:26 ` Joe Perches
1 sibling, 1 reply; 84+ messages in thread
From: David Miller @ 2020-03-12 6:23 UTC (permalink / raw)
To: joe; +Cc: borisp, saeedm, leon, netdev, linux-rdma, linux-kernel
Joe, please use Subject line subsystem prefixes consistent with what would
be used for other changes to these drivers.
Thank you.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-12 6:23 ` David Miller
@ 2020-03-12 6:26 ` Joe Perches
2020-03-12 8:03 ` David Miller
2020-03-12 19:45 ` Jakub Kicinski
0 siblings, 2 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 6:26 UTC (permalink / raw)
To: David Miller; +Cc: borisp, saeedm, leon, netdev, linux-rdma, linux-kernel
On Wed, 2020-03-11 at 23:23 -0700, David Miller wrote:
> Joe, please use Subject line subsystem prefixes consistent with what would
> be used for other changes to these drivers.
Not easy to do for scripted patches.
There's no mechanism that scriptable.
I'm not going to hand-edit 500 patches.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-12 6:26 ` Joe Perches
@ 2020-03-12 8:03 ` David Miller
2020-03-12 19:45 ` Jakub Kicinski
1 sibling, 0 replies; 84+ messages in thread
From: David Miller @ 2020-03-12 8:03 UTC (permalink / raw)
To: joe; +Cc: borisp, saeedm, leon, netdev, linux-rdma, linux-kernel
From: Joe Perches <joe@perches.com>
Date: Wed, 11 Mar 2020 23:26:59 -0700
> I'm not going to hand-edit 500 patches.
Then I'm not applying your stuff, it's as simple as that.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-12 6:26 ` Joe Perches
2020-03-12 8:03 ` David Miller
@ 2020-03-12 19:45 ` Jakub Kicinski
2020-03-12 19:52 ` Joe Perches
1 sibling, 1 reply; 84+ messages in thread
From: Jakub Kicinski @ 2020-03-12 19:45 UTC (permalink / raw)
To: Joe Perches
Cc: David Miller, borisp, saeedm, leon, netdev, linux-rdma, linux-kernel
On Wed, 11 Mar 2020 23:26:59 -0700 Joe Perches wrote:
> On Wed, 2020-03-11 at 23:23 -0700, David Miller wrote:
> > Joe, please use Subject line subsystem prefixes consistent with what would
> > be used for other changes to these drivers.
>
> Not easy to do for scripted patches.
> There's no mechanism that scriptable.
I have this to show me the top 3 prefixes used for files currently
modified in my tree:
tgs() {
local fs
fs=$(git status -s | sed -n 's/ M //p')
git log --oneline --no-merges -- $fs | \
sed -e's/[^ ]* \(.*\):[^:]*/\1/' | \
sort | uniq -c | sort -rn | head -3
}
You could probably massage it to just give you to top one and feed
that into git commit template?
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough;
2020-03-12 19:45 ` Jakub Kicinski
@ 2020-03-12 19:52 ` Joe Perches
0 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 19:52 UTC (permalink / raw)
To: Jakub Kicinski
Cc: David Miller, borisp, saeedm, leon, netdev, linux-rdma, linux-kernel
On Thu, 2020-03-12 at 12:45 -0700, Jakub Kicinski wrote:
> On Wed, 11 Mar 2020 23:26:59 -0700 Joe Perches wrote:
> > On Wed, 2020-03-11 at 23:23 -0700, David Miller wrote:
> > > Joe, please use Subject line subsystem prefixes consistent with what would
> > > be used for other changes to these drivers.
> >
> > Not easy to do for scripted patches.
> > There's no mechanism that scriptable.
>
> I have this to show me the top 3 prefixes used for files currently
> modified in my tree:
>
> tgs() {
> local fs
>
> fs=$(git status -s | sed -n 's/ M //p')
>
> git log --oneline --no-merges -- $fs | \
> sed -e's/[^ ]* \(.*\):[^:]*/\1/' | \
> sort | uniq -c | sort -rn | head -3
> }
>
> You could probably massage it to just give you to top one and feed
> that into git commit template?
I had already tried that via:
$ cat get_patch_subject_prefix.bash
#!/bin/bash
git log --format="%s" --no-merges -200 --since=2-years-ago $@ | \
cut -f1 -d":" | \
sort | uniq -c | sort -rn | head -1 | \
sed 's/^[[:space:]]*[[:digit:]]*[[:space:]]*//'
$
It doesn't work very well for many of the subsystems.
For instance, this script produces things like:
ARM/ZYNQ ARCHITECTURE: treewide
FCOE SUBSYSTEM (libfc, libfcoe, fcoe): scsi
WOLFSON MICROELECTRONICS DRIVERS: ASoC
There isn't a great single mechanism for this.
At various times, I have proposed adding a grammar for
patch subject titles to MAINTAINERS.
Like:
https://lore.kernel.org/lkml/1289919077.28741.50.camel@Joe-Laptop/
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 002/491] MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
2020-03-11 4:51 ` [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough; Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 003/491] MELLANOX MLX5 core VPI driver: " Joe Perches
` (28 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Sunil Goutham, Linu Cherian, Geetha sowjanya, Jerin Jacob
Cc: David S. Miller, netdev, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
index 36953d4..01a7931 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
@@ -737,7 +737,7 @@ static int rvu_nix_aq_enq_inst(struct rvu *rvu, struct nix_aq_enq_req *req,
else if (req->ctype == NIX_AQ_CTYPE_MCE)
memcpy(mask, &req->mce_mask,
sizeof(struct nix_rx_mce_s));
- /* Fall through */
+ fallthrough;
case NIX_AQ_INSTOP_INIT:
if (req->ctype == NIX_AQ_CTYPE_RQ)
memcpy(ctx, &req->rq, sizeof(struct nix_rq_ctx_s));
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH -next 003/491] MELLANOX MLX5 core VPI driver: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
2020-03-11 4:51 ` [PATCH -next 001/491] MELLANOX ETHERNET INNOVA DRIVERS: Use fallthrough; Joe Perches
2020-03-11 4:51 ` [PATCH -next 002/491] MARVELL OCTEONTX2 RVU ADMIN FUNCTION DRIVER: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 7:00 ` Leon Romanovsky
2020-03-11 4:51 ` [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: " Joe Perches
` (27 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Saeed Mahameed, Leon Romanovsky
Cc: netdev, linux-rdma, linux-kernel, bpf
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 8 ++++----
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
index a226277..2a1cc2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
@@ -223,7 +223,7 @@ mlx5e_set_eseg_swp(struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg,
switch (swp_spec->tun_l4_proto) {
case IPPROTO_UDP:
eseg->swp_flags |= MLX5_ETH_WQE_SWP_INNER_L4_UDP;
- /* fall through */
+ fallthrough;
case IPPROTO_TCP:
eseg->swp_inner_l4_offset = skb_inner_transport_offset(skb) / 2;
break;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
index f049e0a..f74e50 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
@@ -167,11 +167,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 */
+ fallthrough;
case XDP_ABORTED:
xdp_abort:
trace_xdp_exception(rq->netdev, prog, act);
- /* fall through */
+ fallthrough;
case XDP_DROP:
rq->stats->xdp_drop++;
return true;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 01539b8..8a3376a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -225,7 +225,7 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset)
return MLX5E_NUM_PFLAGS;
case ETH_SS_TEST:
return mlx5e_self_test_num(priv);
- /* fallthrough */
+ fallthrough;
default:
return -EOPNOTSUPP;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 4b5b661..033454 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -2426,7 +2426,7 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode,
case MLX5_CAP_INLINE_MODE_NOT_REQUIRED:
if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE)
return 0;
- /* fall through */
+ fallthrough;
case MLX5_CAP_INLINE_MODE_L2:
NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set");
return -EOPNOTSUPP;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
index 416676..a40e43 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
@@ -199,13 +199,13 @@ static void mlx5_lag_fib_update(struct work_struct *work)
/* Protect internal structures from changes */
rtnl_lock();
switch (fib_work->event) {
- case FIB_EVENT_ENTRY_REPLACE: /* fall through */
+ case FIB_EVENT_ENTRY_REPLACE:
case FIB_EVENT_ENTRY_DEL:
mlx5_lag_fib_route_event(ldev, fib_work->event,
fib_work->fen_info.fi);
fib_info_put(fib_work->fen_info.fi);
break;
- case FIB_EVENT_NH_ADD: /* fall through */
+ case FIB_EVENT_NH_ADD:
case FIB_EVENT_NH_DEL:
fib_nh = fib_work->fnh_info.fib_nh;
mlx5_lag_fib_nexthop_event(ldev,
@@ -256,7 +256,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
return NOTIFY_DONE;
switch (event) {
- case FIB_EVENT_ENTRY_REPLACE: /* fall through */
+ case FIB_EVENT_ENTRY_REPLACE:
case FIB_EVENT_ENTRY_DEL:
fen_info = container_of(info, struct fib_entry_notifier_info,
info);
@@ -279,7 +279,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
*/
fib_info_hold(fib_work->fen_info.fi);
break;
- case FIB_EVENT_NH_ADD: /* fall through */
+ case FIB_EVENT_NH_ADD:
case FIB_EVENT_NH_DEL:
fnh_info = container_of(info, struct fib_nh_notifier_info,
info);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
index 1faac31f..aea1065 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
@@ -125,7 +125,7 @@ void mlx5_query_min_inline(struct mlx5_core_dev *mdev,
case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT:
if (!mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode))
break;
- /* fall through */
+ fallthrough;
case MLX5_CAP_INLINE_MODE_L2:
*min_inline_mode = MLX5_INLINE_MODE_L2;
break;
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 003/491] MELLANOX MLX5 core VPI driver: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 003/491] MELLANOX MLX5 core VPI driver: " Joe Perches
@ 2020-03-11 7:00 ` Leon Romanovsky
0 siblings, 0 replies; 84+ messages in thread
From: Leon Romanovsky @ 2020-03-11 7:00 UTC (permalink / raw)
To: Joe Perches
Cc: Alexei Starovoitov, Daniel Borkmann, David S. Miller,
Jakub Kicinski, Jesper Dangaard Brouer, John Fastabend,
Saeed Mahameed, netdev, linux-rdma, linux-kernel, bpf
On Tue, Mar 10, 2020 at 09:51:17PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h | 2 +-
> drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 4 ++--
> drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 2 +-
> .../net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
> drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 8 ++++----
> drivers/net/ethernet/mellanox/mlx5/core/vport.c | 2 +-
> 6 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
> index a226277..2a1cc2 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
> @@ -223,7 +223,7 @@ mlx5e_set_eseg_swp(struct sk_buff *skb, struct mlx5_wqe_eth_seg *eseg,
> switch (swp_spec->tun_l4_proto) {
> case IPPROTO_UDP:
> eseg->swp_flags |= MLX5_ETH_WQE_SWP_INNER_L4_UDP;
> - /* fall through */
> + fallthrough;
> case IPPROTO_TCP:
> eseg->swp_inner_l4_offset = skb_inner_transport_offset(skb) / 2;
> break;
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> index f049e0a..f74e50 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
> @@ -167,11 +167,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 */
> + fallthrough;
> case XDP_ABORTED:
> xdp_abort:
> trace_xdp_exception(rq->netdev, prog, act);
> - /* fall through */
> + fallthrough;
> case XDP_DROP:
> rq->stats->xdp_drop++;
> return true;
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index 01539b8..8a3376a 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -225,7 +225,7 @@ int mlx5e_ethtool_get_sset_count(struct mlx5e_priv *priv, int sset)
> return MLX5E_NUM_PFLAGS;
> case ETH_SS_TEST:
> return mlx5e_self_test_num(priv);
> - /* fallthrough */
> + fallthrough;
This should be removed, there is return before.
> default:
> return -EOPNOTSUPP;
> }
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> index 4b5b661..033454 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> @@ -2426,7 +2426,7 @@ int mlx5_devlink_eswitch_inline_mode_set(struct devlink *devlink, u8 mode,
> case MLX5_CAP_INLINE_MODE_NOT_REQUIRED:
> if (mode == DEVLINK_ESWITCH_INLINE_MODE_NONE)
> return 0;
> - /* fall through */
> + fallthrough;
> case MLX5_CAP_INLINE_MODE_L2:
> NL_SET_ERR_MSG_MOD(extack, "Inline mode can't be set");
> return -EOPNOTSUPP;
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
> index 416676..a40e43 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
> @@ -199,13 +199,13 @@ static void mlx5_lag_fib_update(struct work_struct *work)
> /* Protect internal structures from changes */
> rtnl_lock();
> switch (fib_work->event) {
> - case FIB_EVENT_ENTRY_REPLACE: /* fall through */
> + case FIB_EVENT_ENTRY_REPLACE:
> case FIB_EVENT_ENTRY_DEL:
> mlx5_lag_fib_route_event(ldev, fib_work->event,
> fib_work->fen_info.fi);
> fib_info_put(fib_work->fen_info.fi);
> break;
> - case FIB_EVENT_NH_ADD: /* fall through */
> + case FIB_EVENT_NH_ADD:
> case FIB_EVENT_NH_DEL:
> fib_nh = fib_work->fnh_info.fib_nh;
> mlx5_lag_fib_nexthop_event(ldev,
> @@ -256,7 +256,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
> return NOTIFY_DONE;
>
> switch (event) {
> - case FIB_EVENT_ENTRY_REPLACE: /* fall through */
> + case FIB_EVENT_ENTRY_REPLACE:
> case FIB_EVENT_ENTRY_DEL:
> fen_info = container_of(info, struct fib_entry_notifier_info,
> info);
> @@ -279,7 +279,7 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
> */
> fib_info_hold(fib_work->fen_info.fi);
> break;
> - case FIB_EVENT_NH_ADD: /* fall through */
> + case FIB_EVENT_NH_ADD:
> case FIB_EVENT_NH_DEL:
> fnh_info = container_of(info, struct fib_nh_notifier_info,
> info);
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/vport.c b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
> index 1faac31f..aea1065 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/vport.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/vport.c
> @@ -125,7 +125,7 @@ void mlx5_query_min_inline(struct mlx5_core_dev *mdev,
> case MLX5_CAP_INLINE_MODE_VPORT_CONTEXT:
> if (!mlx5_query_nic_vport_min_inline(mdev, 0, min_inline_mode))
> break;
> - /* fall through */
> + fallthrough;
> case MLX5_CAP_INLINE_MODE_L2:
> *min_inline_mode = MLX5_INLINE_MODE_L2;
> break;
> --
> 2.24.0
>
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (2 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 003/491] MELLANOX MLX5 core VPI driver: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 15:30 ` Peter Zijlstra
2020-03-11 19:20 ` Thomas Bogendoerfer
2020-03-11 4:51 ` [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: " Joe Perches
` (26 subsequent siblings)
30 siblings, 2 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Peter Zijlstra, Arnaldo Carvalho de Melo, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim
Cc: Thomas Bogendoerfer, Thomas Gleixner, Borislav Petkov,
H. Peter Anvin, x86, linux-kernel, linux-mips
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/mips/kernel/perf_event_mipsxx.c | 6 +++---
arch/x86/events/intel/core.c | 7 +++----
arch/x86/events/intel/lbr.c | 2 +-
kernel/events/core.c | 3 +--
4 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/arch/mips/kernel/perf_event_mipsxx.c b/arch/mips/kernel/perf_event_mipsxx.c
index 128fc9..484948 100644
--- a/arch/mips/kernel/perf_event_mipsxx.c
+++ b/arch/mips/kernel/perf_event_mipsxx.c
@@ -790,15 +790,15 @@ static void reset_counters(void *arg)
case 4:
mipsxx_pmu_write_control(3, 0);
mipspmu.write_counter(3, 0);
- /* fall through */
+ fallthrough;
case 3:
mipsxx_pmu_write_control(2, 0);
mipspmu.write_counter(2, 0);
- /* fall through */
+ fallthrough;
case 2:
mipsxx_pmu_write_control(1, 0);
mipspmu.write_counter(1, 0);
- /* fall through */
+ fallthrough;
case 1:
mipsxx_pmu_write_control(0, 0);
mipspmu.write_counter(0, 0);
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 332954..8cd3bb 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4637,8 +4637,7 @@ __init int intel_pmu_init(void)
case INTEL_FAM6_CORE2_MEROM:
x86_add_quirk(intel_clovertown_quirk);
- /* fall through */
-
+ fallthrough;
case INTEL_FAM6_CORE2_MEROM_L:
case INTEL_FAM6_CORE2_PENRYN:
case INTEL_FAM6_CORE2_DUNNINGTON:
@@ -5017,7 +5016,7 @@ __init int intel_pmu_init(void)
case INTEL_FAM6_SKYLAKE_X:
pmem = true;
- /* fall through */
+ fallthrough;
case INTEL_FAM6_SKYLAKE_L:
case INTEL_FAM6_SKYLAKE:
case INTEL_FAM6_KABYLAKE_L:
@@ -5069,7 +5068,7 @@ __init int intel_pmu_init(void)
case INTEL_FAM6_ICELAKE_X:
case INTEL_FAM6_ICELAKE_D:
pmem = true;
- /* fall through */
+ fallthrough;
case INTEL_FAM6_ICELAKE_L:
case INTEL_FAM6_ICELAKE:
case INTEL_FAM6_TIGERLAKE_L:
diff --git a/arch/x86/events/intel/lbr.c b/arch/x86/events/intel/lbr.c
index 65113b1..2e2c6fb 100644
--- a/arch/x86/events/intel/lbr.c
+++ b/arch/x86/events/intel/lbr.c
@@ -967,7 +967,7 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
ret = X86_BR_ZERO_CALL;
break;
}
- /* fall through */
+ fallthrough;
case 0x9a: /* call far absolute */
ret = X86_BR_CALL;
break;
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 6a47c3..7a8ed4d5 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9762,8 +9762,7 @@ perf_event_parse_addr_filter(struct perf_event *event, char *fstr,
case IF_SRC_KERNELADDR:
case IF_SRC_KERNEL:
kernel = 1;
- /* fall through */
-
+ fallthrough;
case IF_SRC_FILEADDR:
case IF_SRC_FILE:
if (state != IF_STATE_SOURCE)
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: " Joe Perches
@ 2020-03-11 15:30 ` Peter Zijlstra
2020-03-12 6:15 ` Joe Perches
2020-03-11 19:20 ` Thomas Bogendoerfer
1 sibling, 1 reply; 84+ messages in thread
From: Peter Zijlstra @ 2020-03-11 15:30 UTC (permalink / raw)
To: Joe Perches
Cc: Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Thomas Bogendoerfer, Thomas Gleixner,
Borislav Petkov, H. Peter Anvin, x86, linux-kernel, linux-mips
On Tue, Mar 10, 2020 at 09:51:18PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
The subject can use a little less screaming, but the actual patch is
fine.
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;
2020-03-11 15:30 ` Peter Zijlstra
@ 2020-03-12 6:15 ` Joe Perches
0 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 6:15 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Thomas Bogendoerfer, Thomas Gleixner,
Borislav Petkov, H. Peter Anvin, x86, linux-kernel, linux-mips
On Wed, 2020-03-11 at 16:30 +0100, Peter Zijlstra wrote:
> On Tue, Mar 10, 2020 at 09:51:18PM -0700, Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
>
> The subject can use a little less screaming, but the actual patch is
> fine.
Patch subject come from the MAINTAINERS subsystem/section heading
because I don't see a better way to script the patch subject that
is more effective.
Using something like:
$ cat get_patch_subject_prefix.bash
#!/bin/bash
git log --format="%s" --no-merges -200 --since=2-years-ago $@ | \
cut -f1 -d":" | \
sort | uniq -c | sort -rn | head -1 | \
sed 's/^[[:space:]]*[[:digit:]]*[[:space:]]*//'
$
Does well for some sets of files, less well for others.
For instance:
$ ./get_patch_subject_prefix.bash drivers/net/ethernet/intel/
ice
which is just one of 10 or so subsystems of intel/...
And there's no way I'm going to individually edit
~500 patches for every specific maintainer's preference.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: " Joe Perches
2020-03-11 15:30 ` Peter Zijlstra
@ 2020-03-11 19:20 ` Thomas Bogendoerfer
1 sibling, 0 replies; 84+ messages in thread
From: Thomas Bogendoerfer @ 2020-03-11 19:20 UTC (permalink / raw)
To: Joe Perches
Cc: Peter Zijlstra, Arnaldo Carvalho de Melo, Mark Rutland,
Alexander Shishkin, Jiri Olsa, Namhyung Kim, Thomas Gleixner,
Borislav Petkov, H. Peter Anvin, x86, linux-kernel, linux-mips
On Tue, Mar 10, 2020 at 09:51:18PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (3 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 004/491] PERFORMANCE EVENTS SUBSYSTEM: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 5:15 ` Masahiro Yamada
2020-03-11 4:51 ` [PATCH -next 006/491] ARM/RISCPC " Joe Perches
` (25 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-arm-kernel,
linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/tty/serial/8250/8250_uniphier.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
index e0b73a5..a2978ab 100644
--- a/drivers/tty/serial/8250/8250_uniphier.c
+++ b/drivers/tty/serial/8250/8250_uniphier.c
@@ -75,7 +75,7 @@ static unsigned int uniphier_serial_in(struct uart_port *p, int offset)
break;
case UART_LCR:
valshift = 8;
- /* fall through */
+ fallthrough;
case UART_MCR:
offset = UNIPHIER_UART_LCR_MCR;
break;
@@ -101,7 +101,7 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value)
case UART_SCR:
/* No SCR for this hardware. Use CHAR as a scratch register */
valshift = 8;
- /* fall through */
+ fallthrough;
case UART_FCR:
offset = UNIPHIER_UART_CHAR_FCR;
break;
@@ -109,7 +109,7 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value)
valshift = 8;
/* Divisor latch access bit does not exist. */
value &= ~UART_LCR_DLAB;
- /* fall through */
+ fallthrough;
case UART_MCR:
offset = UNIPHIER_UART_LCR_MCR;
break;
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: " Joe Perches
@ 2020-03-11 5:15 ` Masahiro Yamada
2020-03-11 14:31 ` Joe Perches
0 siblings, 1 reply; 84+ messages in thread
From: Masahiro Yamada @ 2020-03-11 5:15 UTC (permalink / raw)
To: Joe Perches
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-arm-kernel,
Linux Kernel Mailing List
On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
>
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
But, I think the patch subject should be prefixed:
"serial: 8250_uniphier:"
> ---
> drivers/tty/serial/8250/8250_uniphier.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
> index e0b73a5..a2978ab 100644
> --- a/drivers/tty/serial/8250/8250_uniphier.c
> +++ b/drivers/tty/serial/8250/8250_uniphier.c
> @@ -75,7 +75,7 @@ static unsigned int uniphier_serial_in(struct uart_port *p, int offset)
> break;
> case UART_LCR:
> valshift = 8;
> - /* fall through */
> + fallthrough;
> case UART_MCR:
> offset = UNIPHIER_UART_LCR_MCR;
> break;
> @@ -101,7 +101,7 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value)
> case UART_SCR:
> /* No SCR for this hardware. Use CHAR as a scratch register */
> valshift = 8;
> - /* fall through */
> + fallthrough;
> case UART_FCR:
> offset = UNIPHIER_UART_CHAR_FCR;
> break;
> @@ -109,7 +109,7 @@ static void uniphier_serial_out(struct uart_port *p, int offset, int value)
> valshift = 8;
> /* Divisor latch access bit does not exist. */
> value &= ~UART_LCR_DLAB;
> - /* fall through */
> + fallthrough;
> case UART_MCR:
> offset = UNIPHIER_UART_LCR_MCR;
> break;
> --
> 2.24.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-11 5:15 ` Masahiro Yamada
@ 2020-03-11 14:31 ` Joe Perches
2020-03-12 8:56 ` Greg Kroah-Hartman
0 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 14:31 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, linux-arm-kernel,
Linux Kernel Mailing List
On Wed, 2020-03-11 at 14:15 +0900, Masahiro Yamada wrote:
> On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
>
> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
>
> But, I think the patch subject should be prefixed:
> "serial: 8250_uniphier:"
Yeah thanks, that's difficult to script though.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-11 14:31 ` Joe Perches
@ 2020-03-12 8:56 ` Greg Kroah-Hartman
2020-03-12 9:02 ` Masahiro Yamada
2020-03-12 9:03 ` Joe Perches
0 siblings, 2 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-12 8:56 UTC (permalink / raw)
To: Joe Perches
Cc: Masahiro Yamada, Jiri Slaby, linux-serial, linux-arm-kernel,
Linux Kernel Mailing List
On Wed, Mar 11, 2020 at 07:31:07AM -0700, Joe Perches wrote:
> On Wed, 2020-03-11 at 14:15 +0900, Masahiro Yamada wrote:
> > On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
> > > Convert the various uses of fallthrough comments to fallthrough;
> > >
> > > Done via script
> > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> >
> > Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >
> >
> > But, I think the patch subject should be prefixed:
> > "serial: 8250_uniphier:"
>
> Yeah thanks, that's difficult to script though.
>
>
Kernel development is hard :)
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-12 8:56 ` Greg Kroah-Hartman
@ 2020-03-12 9:02 ` Masahiro Yamada
2020-03-12 9:36 ` Greg Kroah-Hartman
2020-03-12 9:37 ` Joe Perches
2020-03-12 9:03 ` Joe Perches
1 sibling, 2 replies; 84+ messages in thread
From: Masahiro Yamada @ 2020-03-12 9:02 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Joe Perches, Jiri Slaby, linux-serial, linux-arm-kernel,
Linux Kernel Mailing List
On Thu, Mar 12, 2020 at 5:56 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Wed, Mar 11, 2020 at 07:31:07AM -0700, Joe Perches wrote:
> > On Wed, 2020-03-11 at 14:15 +0900, Masahiro Yamada wrote:
> > > On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
> > > > Convert the various uses of fallthrough comments to fallthrough;
> > > >
> > > > Done via script
> > > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > > >
> > > > Signed-off-by: Joe Perches <joe@perches.com>
> > >
> > > Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > >
> > >
> > > But, I think the patch subject should be prefixed:
> > > "serial: 8250_uniphier:"
> >
> > Yeah thanks, that's difficult to script though.
> >
> >
>
> Kernel development is hard :)
It is strange to process this per-platform
and to send out a giant series that
consists of 491 patches.
This is very trivial conversion.
I think it is better to have a single patch
to convert all files under drivers/tty/serial/,
with the patch subject "serial:".
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-12 9:02 ` Masahiro Yamada
@ 2020-03-12 9:36 ` Greg Kroah-Hartman
2020-03-12 9:37 ` Joe Perches
1 sibling, 0 replies; 84+ messages in thread
From: Greg Kroah-Hartman @ 2020-03-12 9:36 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Joe Perches, Jiri Slaby, linux-serial, linux-arm-kernel,
Linux Kernel Mailing List
On Thu, Mar 12, 2020 at 06:02:19PM +0900, Masahiro Yamada wrote:
> On Thu, Mar 12, 2020 at 5:56 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Mar 11, 2020 at 07:31:07AM -0700, Joe Perches wrote:
> > > On Wed, 2020-03-11 at 14:15 +0900, Masahiro Yamada wrote:
> > > > On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
> > > > > Convert the various uses of fallthrough comments to fallthrough;
> > > > >
> > > > > Done via script
> > > > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > > > >
> > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > >
> > > > Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > >
> > > >
> > > > But, I think the patch subject should be prefixed:
> > > > "serial: 8250_uniphier:"
> > >
> > > Yeah thanks, that's difficult to script though.
> > >
> > >
> >
> > Kernel development is hard :)
>
>
> It is strange to process this per-platform
> and to send out a giant series that
> consists of 491 patches.
>
> This is very trivial conversion.
>
> I think it is better to have a single patch
> to convert all files under drivers/tty/serial/,
> with the patch subject "serial:".
I agree.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-12 9:02 ` Masahiro Yamada
2020-03-12 9:36 ` Greg Kroah-Hartman
@ 2020-03-12 9:37 ` Joe Perches
2020-03-12 13:47 ` Theodore Y. Ts'o
1 sibling, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-12 9:37 UTC (permalink / raw)
To: Masahiro Yamada, Greg Kroah-Hartman
Cc: Jiri Slaby, linux-serial, linux-arm-kernel, Linux Kernel Mailing List
On Thu, 2020-03-12 at 18:02 +0900, Masahiro Yamada wrote:
> On Thu, Mar 12, 2020 at 5:56 PM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Wed, Mar 11, 2020 at 07:31:07AM -0700, Joe Perches wrote:
> > > On Wed, 2020-03-11 at 14:15 +0900, Masahiro Yamada wrote:
> > > > On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
> > > > > Convert the various uses of fallthrough comments to fallthrough;
> > > > >
> > > > > Done via script
> > > > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > > > >
> > > > > Signed-off-by: Joe Perches <joe@perches.com>
> > > >
> > > > Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > > >
> > > >
> > > > But, I think the patch subject should be prefixed:
> > > > "serial: 8250_uniphier:"
> > >
> > > Yeah thanks, that's difficult to script though.
> > >
> > >
> >
> > Kernel development is hard :)
>
> It is strange to process this per-platform
> and to send out a giant series that
> consists of 491 patches.
>
> This is very trivial conversion.
>
> I think it is better to have a single patch
> to convert all files under drivers/tty/serial/,
> with the patch subject "serial:".
The difficulty there is determining where these
subsystem spanning blocks should begin and end.
That could not be done for instance with drivers/net.
As I have suggested a few times, better still
would be to have a mechanism for scripted patches
applied possibly as single treewide patch.
Likely applied only at an -rc1.
The stated negatives to a treewide mechanism
have been difficulty to backport to -stable.
Perhaps a mechanism like
git format-patch --stdout <treewide_commit_to_backport> | \
git apply --include=<specific_files>
with some automated rewrite of the treewide patch subject
then commit could help.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-12 9:37 ` Joe Perches
@ 2020-03-12 13:47 ` Theodore Y. Ts'o
2020-03-12 14:15 ` Joe Perches
0 siblings, 1 reply; 84+ messages in thread
From: Theodore Y. Ts'o @ 2020-03-12 13:47 UTC (permalink / raw)
To: Joe Perches
Cc: Masahiro Yamada, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
linux-arm-kernel, Linux Kernel Mailing List
On Thu, Mar 12, 2020 at 02:37:31AM -0700, Joe Perches wrote:
> As I have suggested a few times, better still
> would be to have a mechanism for scripted patches
> applied possibly as single treewide patch.
>
> Likely applied only at an -rc1.
>
> The stated negatives to a treewide mechanism
> have been difficulty to backport to -stable.
Any time we do a massive, disruptive change to the code base, it's
going to cause problems to -stable. It means that bug fix patches
won't necessarily auto-apply, and some will require manual fixups
afterwards
Given that this change doesn't really fix any bugs, I'd have to ask
the question --- is it *worth* it? We really need to apply a certain
amount of cost/benefit analysis around this.
If it were really important, the thing we could do is to apply a
single treewide patch at some point after the merge window. I'd
suggest after -rc2, myself, but reasonable people can differ. And
then, if it were *really* important we could run the same script on
the stable kernels.
But for changing "/* fallthrough */" to "fallthrough;"
Does this ***really*** matter? Why are we tying ourselves up in knots
trying to do this all at once?
- Ted
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-12 13:47 ` Theodore Y. Ts'o
@ 2020-03-12 14:15 ` Joe Perches
0 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 14:15 UTC (permalink / raw)
To: Theodore Y. Ts'o
Cc: Masahiro Yamada, Greg Kroah-Hartman, Jiri Slaby, linux-serial,
linux-arm-kernel, Linux Kernel Mailing List
On Thu, 2020-03-12 at 09:47 -0400, Theodore Y. Ts'o wrote:
> On Thu, Mar 12, 2020 at 02:37:31AM -0700, Joe Perches wrote:
> > As I have suggested a few times, better still
> > would be to have a mechanism for scripted patches
> > applied possibly as single treewide patch.
> >
> > Likely applied only at an -rc1.
> >
> > The stated negatives to a treewide mechanism
> > have been difficulty to backport to -stable.
>
> Any time we do a massive, disruptive change to the code base, it's
> going to cause problems to -stable. It means that bug fix patches
> won't necessarily auto-apply, and some will require manual fixups
> afterwards
That's mostly a tools problem than a real problem.
> Given that this change doesn't really fix any bugs, I'd have to ask
> the question --- is it *worth* it? We really need to apply a certain
> amount of cost/benefit analysis around this.
>
> If it were really important, the thing we could do is to apply a
> single treewide patch at some point after the merge window. I'd
> suggest after -rc2, myself, but reasonable people can differ. And
> then, if it were *really* important we could run the same script on
> the stable kernels.
>
> But for changing "/* fallthrough */" to "fallthrough;"
>
> Does this ***really*** matter?
That depends a bit on whether clang is your
compiler of choice.
> Why are we tying ourselves up in knots
> trying to do this all at once?
Discretely or treewide, all at once or done over time,
the impact problem to backports is the same.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: Use fallthrough;
2020-03-12 8:56 ` Greg Kroah-Hartman
2020-03-12 9:02 ` Masahiro Yamada
@ 2020-03-12 9:03 ` Joe Perches
1 sibling, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 9:03 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Masahiro Yamada, Jiri Slaby, linux-serial, linux-arm-kernel,
Linux Kernel Mailing List
On Thu, 2020-03-12 at 09:56 +0100, Greg Kroah-Hartman wrote:
> On Wed, Mar 11, 2020 at 07:31:07AM -0700, Joe Perches wrote:
> > On Wed, 2020-03-11 at 14:15 +0900, Masahiro Yamada wrote:
> > > On Wed, Mar 11, 2020 at 2:07 PM Joe Perches <joe@perches.com> wrote:
> > > > Convert the various uses of fallthrough comments to fallthrough;
> > > >
> > > > Done via script
> > > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > > >
> > > > Signed-off-by: Joe Perches <joe@perches.com>
> > >
> > > Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > >
> > >
> > > But, I think the patch subject should be prefixed:
> > > "serial: 8250_uniphier:"
> >
> > Yeah thanks, that's difficult to script though.
> >
> >
>
> Kernel development is hard :)
Not really, kernel development processes are pretty stupid sometimes.
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 006/491] ARM/RISCPC ARCHITECTURE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (4 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 005/491] ARM/UNIPHIER ARCHITECTURE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-12 10:11 ` Russell King - ARM Linux admin
2020-03-11 4:51 ` [PATCH -next 007/491] KERNEL VIRTUAL MACHINE FOR ARM/ARM64 (KVM/arm, KVM/arm64): " Joe Perches
` (24 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Russell King
Cc: James E.J. Bottomley, Martin K. Petersen, linux-arm-kernel,
linux-kernel, linux-scsi
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/arm/mach-rpc/riscpc.c | 2 +-
drivers/scsi/arm/fas216.c | 17 ++++++-----------
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index ea2c842..d23970b 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -46,7 +46,7 @@ static int __init parse_tag_acorn(const struct tag *tag)
switch (tag->u.acorn.vram_pages) {
case 512:
vram_size += PAGE_SIZE * 256;
- /* Fall through - ??? */
+ fallthrough; /* ??? */
case 256:
vram_size += PAGE_SIZE * 256;
default:
diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
index 6c68c230..bb18be 100644
--- a/drivers/scsi/arm/fas216.c
+++ b/drivers/scsi/arm/fas216.c
@@ -603,8 +603,7 @@ static void fas216_handlesync(FAS216_Info *info, char *msg)
msgqueue_flush(&info->scsi.msgs);
msgqueue_addmsg(&info->scsi.msgs, 1, MESSAGE_REJECT);
info->scsi.phase = PHASE_MSGOUT_EXPECT;
- /* fall through */
-
+ fallthrough;
case async:
dev->period = info->ifcfg.asyncperiod / 4;
dev->sof = 0;
@@ -916,8 +915,7 @@ static void fas216_disconnect_intr(FAS216_Info *info)
fas216_done(info, DID_ABORT);
break;
}
- /* else, fall through */
-
+ fallthrough;
default: /* huh? */
printk(KERN_ERR "scsi%d.%c: unexpected disconnect in phase %s\n",
info->host->host_no, fas216_target(info), fas216_drv_phase(info));
@@ -1413,8 +1411,7 @@ static void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigne
case STATE(STAT_STATUS, PHASE_DATAOUT): /* Data Out -> Status */
case STATE(STAT_STATUS, PHASE_DATAIN): /* Data In -> Status */
fas216_stoptransfer(info);
- /* fall through */
-
+ fallthrough;
case STATE(STAT_STATUS, PHASE_SELSTEPS):/* Sel w/ steps -> Status */
case STATE(STAT_STATUS, PHASE_MSGOUT): /* Message Out -> Status */
case STATE(STAT_STATUS, PHASE_COMMAND): /* Command -> Status */
@@ -1426,8 +1423,7 @@ static void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigne
case STATE(STAT_MESGIN, PHASE_DATAOUT): /* Data Out -> Message In */
case STATE(STAT_MESGIN, PHASE_DATAIN): /* Data In -> Message In */
fas216_stoptransfer(info);
- /* fall through */
-
+ fallthrough;
case STATE(STAT_MESGIN, PHASE_COMMAND): /* Command -> Message In */
case STATE(STAT_MESGIN, PHASE_SELSTEPS):/* Sel w/ steps -> Message In */
case STATE(STAT_MESGIN, PHASE_MSGOUT): /* Message Out -> Message In */
@@ -1581,8 +1577,7 @@ static void fas216_funcdone_intr(FAS216_Info *info, unsigned int stat, unsigned
fas216_message(info);
break;
}
- /* else, fall through */
-
+ fallthrough;
default:
fas216_log(info, 0, "internal phase %s for function done?"
" What do I do with this?",
@@ -1964,7 +1959,7 @@ static void fas216_kick(FAS216_Info *info)
switch (where_from) {
case TYPE_QUEUE:
fas216_allocate_tag(info, SCpnt);
- /* fall through */
+ fallthrough;
case TYPE_OTHER:
fas216_start_command(info, SCpnt);
break;
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 006/491] ARM/RISCPC ARCHITECTURE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 006/491] ARM/RISCPC " Joe Perches
@ 2020-03-12 10:11 ` Russell King - ARM Linux admin
2020-03-12 10:19 ` Joe Perches
0 siblings, 1 reply; 84+ messages in thread
From: Russell King - ARM Linux admin @ 2020-03-12 10:11 UTC (permalink / raw)
To: Joe Perches
Cc: James E.J. Bottomley, Martin K. Petersen, linux-arm-kernel,
linux-kernel, linux-scsi
On Tue, Mar 10, 2020 at 09:51:20PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
And the point of what on the face of it seems to be useless churn is?
What compilers support this?
I'd check the gcc manual, but debian doesn't provide it.
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/arm/mach-rpc/riscpc.c | 2 +-
> drivers/scsi/arm/fas216.c | 17 ++++++-----------
> 2 files changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
> index ea2c842..d23970b 100644
> --- a/arch/arm/mach-rpc/riscpc.c
> +++ b/arch/arm/mach-rpc/riscpc.c
> @@ -46,7 +46,7 @@ static int __init parse_tag_acorn(const struct tag *tag)
> switch (tag->u.acorn.vram_pages) {
> case 512:
> vram_size += PAGE_SIZE * 256;
> - /* Fall through - ??? */
> + fallthrough; /* ??? */
> case 256:
> vram_size += PAGE_SIZE * 256;
> default:
> diff --git a/drivers/scsi/arm/fas216.c b/drivers/scsi/arm/fas216.c
> index 6c68c230..bb18be 100644
> --- a/drivers/scsi/arm/fas216.c
> +++ b/drivers/scsi/arm/fas216.c
> @@ -603,8 +603,7 @@ static void fas216_handlesync(FAS216_Info *info, char *msg)
> msgqueue_flush(&info->scsi.msgs);
> msgqueue_addmsg(&info->scsi.msgs, 1, MESSAGE_REJECT);
> info->scsi.phase = PHASE_MSGOUT_EXPECT;
> - /* fall through */
> -
> + fallthrough;
> case async:
> dev->period = info->ifcfg.asyncperiod / 4;
> dev->sof = 0;
> @@ -916,8 +915,7 @@ static void fas216_disconnect_intr(FAS216_Info *info)
> fas216_done(info, DID_ABORT);
> break;
> }
> - /* else, fall through */
> -
> + fallthrough;
> default: /* huh? */
> printk(KERN_ERR "scsi%d.%c: unexpected disconnect in phase %s\n",
> info->host->host_no, fas216_target(info), fas216_drv_phase(info));
> @@ -1413,8 +1411,7 @@ static void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigne
> case STATE(STAT_STATUS, PHASE_DATAOUT): /* Data Out -> Status */
> case STATE(STAT_STATUS, PHASE_DATAIN): /* Data In -> Status */
> fas216_stoptransfer(info);
> - /* fall through */
> -
> + fallthrough;
> case STATE(STAT_STATUS, PHASE_SELSTEPS):/* Sel w/ steps -> Status */
> case STATE(STAT_STATUS, PHASE_MSGOUT): /* Message Out -> Status */
> case STATE(STAT_STATUS, PHASE_COMMAND): /* Command -> Status */
> @@ -1426,8 +1423,7 @@ static void fas216_busservice_intr(FAS216_Info *info, unsigned int stat, unsigne
> case STATE(STAT_MESGIN, PHASE_DATAOUT): /* Data Out -> Message In */
> case STATE(STAT_MESGIN, PHASE_DATAIN): /* Data In -> Message In */
> fas216_stoptransfer(info);
> - /* fall through */
> -
> + fallthrough;
> case STATE(STAT_MESGIN, PHASE_COMMAND): /* Command -> Message In */
> case STATE(STAT_MESGIN, PHASE_SELSTEPS):/* Sel w/ steps -> Message In */
> case STATE(STAT_MESGIN, PHASE_MSGOUT): /* Message Out -> Message In */
> @@ -1581,8 +1577,7 @@ static void fas216_funcdone_intr(FAS216_Info *info, unsigned int stat, unsigned
> fas216_message(info);
> break;
> }
> - /* else, fall through */
> -
> + fallthrough;
> default:
> fas216_log(info, 0, "internal phase %s for function done?"
> " What do I do with this?",
> @@ -1964,7 +1959,7 @@ static void fas216_kick(FAS216_Info *info)
> switch (where_from) {
> case TYPE_QUEUE:
> fas216_allocate_tag(info, SCpnt);
> - /* fall through */
> + fallthrough;
> case TYPE_OTHER:
> fas216_start_command(info, SCpnt);
> break;
> --
> 2.24.0
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 006/491] ARM/RISCPC ARCHITECTURE: Use fallthrough;
2020-03-12 10:11 ` Russell King - ARM Linux admin
@ 2020-03-12 10:19 ` Joe Perches
0 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 10:19 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: James E.J. Bottomley, Martin K. Petersen, linux-arm-kernel,
linux-kernel, linux-scsi
On Thu, 2020-03-12 at 10:11 +0000, Russell King - ARM Linux admin wrote:
> On Tue, Mar 10, 2020 at 09:51:20PM -0700, Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
>
> And the point of what on the face of it seems to be useless churn is?
>
> What compilers support this?
gcc 7.1, clang 9
clang does not support the /* fallthrough */ comment styles.
clang does support the __attribute__((__fallthrough__))
and the c++17 [[fallthrough]] weirdness.
see:
commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough' pseudo
keyword for switch/case use")
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 007/491] KERNEL VIRTUAL MACHINE FOR ARM/ARM64 (KVM/arm, KVM/arm64): Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (5 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 006/491] ARM/RISCPC " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 008/491] ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE: " Joe Perches
` (23 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Marc Zyngier, James Morse, Julien Thierry, Suzuki K Poulose
Cc: Catalin Marinas, Will Deacon, linux-arm-kernel, kvmarm, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/arm64/kvm/handle_exit.c | 2 +-
arch/arm64/kvm/hyp/debug-sr.c | 60 +++++++++++++++++------------------
virt/kvm/arm/hyp/vgic-v3-sr.c | 16 +++++-----
3 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c
index aacfc5..b14d6a 100644
--- a/arch/arm64/kvm/handle_exit.c
+++ b/arch/arm64/kvm/handle_exit.c
@@ -128,7 +128,7 @@ static int kvm_handle_guest_debug(struct kvm_vcpu *vcpu, struct kvm_run *run)
switch (ESR_ELx_EC(hsr)) {
case ESR_ELx_EC_WATCHPT_LOW:
run->debug.arch.far = vcpu->arch.fault.far_el2;
- /* fall through */
+ fallthrough;
case ESR_ELx_EC_SOFTSTP_LOW:
case ESR_ELx_EC_BREAKPT_LOW:
case ESR_ELx_EC_BKPT32:
diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c
index 0fc987..b074d3 100644
--- a/arch/arm64/kvm/hyp/debug-sr.c
+++ b/arch/arm64/kvm/hyp/debug-sr.c
@@ -18,70 +18,70 @@
#define save_debug(ptr,reg,nr) \
switch (nr) { \
case 15: ptr[15] = read_debug(reg, 15); \
- /* Fall through */ \
+ fallthrough; \
case 14: ptr[14] = read_debug(reg, 14); \
- /* Fall through */ \
+ fallthrough; \
case 13: ptr[13] = read_debug(reg, 13); \
- /* Fall through */ \
+ fallthrough; \
case 12: ptr[12] = read_debug(reg, 12); \
- /* Fall through */ \
+ fallthrough; \
case 11: ptr[11] = read_debug(reg, 11); \
- /* Fall through */ \
+ fallthrough; \
case 10: ptr[10] = read_debug(reg, 10); \
- /* Fall through */ \
+ fallthrough; \
case 9: ptr[9] = read_debug(reg, 9); \
- /* Fall through */ \
+ fallthrough; \
case 8: ptr[8] = read_debug(reg, 8); \
- /* Fall through */ \
+ fallthrough; \
case 7: ptr[7] = read_debug(reg, 7); \
- /* Fall through */ \
+ fallthrough; \
case 6: ptr[6] = read_debug(reg, 6); \
- /* Fall through */ \
+ fallthrough; \
case 5: ptr[5] = read_debug(reg, 5); \
- /* Fall through */ \
+ fallthrough; \
case 4: ptr[4] = read_debug(reg, 4); \
- /* Fall through */ \
+ fallthrough; \
case 3: ptr[3] = read_debug(reg, 3); \
- /* Fall through */ \
+ fallthrough; \
case 2: ptr[2] = read_debug(reg, 2); \
- /* Fall through */ \
+ fallthrough; \
case 1: ptr[1] = read_debug(reg, 1); \
- /* Fall through */ \
+ fallthrough; \
default: ptr[0] = read_debug(reg, 0); \
}
#define restore_debug(ptr,reg,nr) \
switch (nr) { \
case 15: write_debug(ptr[15], reg, 15); \
- /* Fall through */ \
+ fallthrough; \
case 14: write_debug(ptr[14], reg, 14); \
- /* Fall through */ \
+ fallthrough; \
case 13: write_debug(ptr[13], reg, 13); \
- /* Fall through */ \
+ fallthrough; \
case 12: write_debug(ptr[12], reg, 12); \
- /* Fall through */ \
+ fallthrough; \
case 11: write_debug(ptr[11], reg, 11); \
- /* Fall through */ \
+ fallthrough; \
case 10: write_debug(ptr[10], reg, 10); \
- /* Fall through */ \
+ fallthrough; \
case 9: write_debug(ptr[9], reg, 9); \
- /* Fall through */ \
+ fallthrough; \
case 8: write_debug(ptr[8], reg, 8); \
- /* Fall through */ \
+ fallthrough; \
case 7: write_debug(ptr[7], reg, 7); \
- /* Fall through */ \
+ fallthrough; \
case 6: write_debug(ptr[6], reg, 6); \
- /* Fall through */ \
+ fallthrough; \
case 5: write_debug(ptr[5], reg, 5); \
- /* Fall through */ \
+ fallthrough; \
case 4: write_debug(ptr[4], reg, 4); \
- /* Fall through */ \
+ fallthrough; \
case 3: write_debug(ptr[3], reg, 3); \
- /* Fall through */ \
+ fallthrough; \
case 2: write_debug(ptr[2], reg, 2); \
- /* Fall through */ \
+ fallthrough; \
case 1: write_debug(ptr[1], reg, 1); \
- /* Fall through */ \
+ fallthrough; \
default: write_debug(ptr[0], reg, 0); \
}
diff --git a/virt/kvm/arm/hyp/vgic-v3-sr.c b/virt/kvm/arm/hyp/vgic-v3-sr.c
index ccf1fde..93331f2 100644
--- a/virt/kvm/arm/hyp/vgic-v3-sr.c
+++ b/virt/kvm/arm/hyp/vgic-v3-sr.c
@@ -349,10 +349,10 @@ void __hyp_text __vgic_v3_save_aprs(struct kvm_vcpu *vcpu)
case 7:
cpu_if->vgic_ap0r[3] = __vgic_v3_read_ap0rn(3);
cpu_if->vgic_ap0r[2] = __vgic_v3_read_ap0rn(2);
- /* Fall through */
+ fallthrough;
case 6:
cpu_if->vgic_ap0r[1] = __vgic_v3_read_ap0rn(1);
- /* Fall through */
+ fallthrough;
default:
cpu_if->vgic_ap0r[0] = __vgic_v3_read_ap0rn(0);
}
@@ -361,10 +361,10 @@ void __hyp_text __vgic_v3_save_aprs(struct kvm_vcpu *vcpu)
case 7:
cpu_if->vgic_ap1r[3] = __vgic_v3_read_ap1rn(3);
cpu_if->vgic_ap1r[2] = __vgic_v3_read_ap1rn(2);
- /* Fall through */
+ fallthrough;
case 6:
cpu_if->vgic_ap1r[1] = __vgic_v3_read_ap1rn(1);
- /* Fall through */
+ fallthrough;
default:
cpu_if->vgic_ap1r[0] = __vgic_v3_read_ap1rn(0);
}
@@ -386,10 +386,10 @@ void __hyp_text __vgic_v3_restore_aprs(struct kvm_vcpu *vcpu)
case 7:
__vgic_v3_write_ap0rn(cpu_if->vgic_ap0r[3], 3);
__vgic_v3_write_ap0rn(cpu_if->vgic_ap0r[2], 2);
- /* Fall through */
+ fallthrough;
case 6:
__vgic_v3_write_ap0rn(cpu_if->vgic_ap0r[1], 1);
- /* Fall through */
+ fallthrough;
default:
__vgic_v3_write_ap0rn(cpu_if->vgic_ap0r[0], 0);
}
@@ -398,10 +398,10 @@ void __hyp_text __vgic_v3_restore_aprs(struct kvm_vcpu *vcpu)
case 7:
__vgic_v3_write_ap1rn(cpu_if->vgic_ap1r[3], 3);
__vgic_v3_write_ap1rn(cpu_if->vgic_ap1r[2], 2);
- /* Fall through */
+ fallthrough;
case 6:
__vgic_v3_write_ap1rn(cpu_if->vgic_ap1r[1], 1);
- /* Fall through */
+ fallthrough;
default:
__vgic_v3_write_ap1rn(cpu_if->vgic_ap1r[0], 0);
}
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH -next 008/491] ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (6 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 007/491] KERNEL VIRTUAL MACHINE FOR ARM/ARM64 (KVM/arm, KVM/arm64): " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-13 19:26 ` Alexander Sverdlin
2020-03-11 4:51 ` [PATCH -next 009/491] ARM/Amlogic Meson SoC support: " Joe Perches
` (22 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Hartley Sweeten, Alexander Sverdlin
Cc: Russell King, linux-arm-kernel, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/arm/mach-ep93xx/crunch.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/mach-ep93xx/crunch.c b/arch/arm/mach-ep93xx/crunch.c
index 1c05c5b..f02e978 100644
--- a/arch/arm/mach-ep93xx/crunch.c
+++ b/arch/arm/mach-ep93xx/crunch.c
@@ -49,8 +49,7 @@ static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t)
* FALLTHROUGH: Ensure we don't try to overwrite our newly
* initialised state information on the first fault.
*/
- /* Fall through */
-
+ fallthrough;
case THREAD_NOTIFY_EXIT:
crunch_task_release(thread);
break;
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 008/491] ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 008/491] ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE: " Joe Perches
@ 2020-03-13 19:26 ` Alexander Sverdlin
0 siblings, 0 replies; 84+ messages in thread
From: Alexander Sverdlin @ 2020-03-13 19:26 UTC (permalink / raw)
To: Joe Perches; +Cc: Hartley Sweeten, Russell King, linux-arm-kernel, linux-kernel
Hello Joe,
On Tue, 10 Mar 2020 21:51:22 -0700
Joe Perches <joe@perches.com> wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
I think the patch is OK, but the automatically-generated first
commit message line has a room for improvement.
But, as I understood, it has chances to be re-sent as one patch for
all files.
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/arm/mach-ep93xx/crunch.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/crunch.c b/arch/arm/mach-ep93xx/crunch.c
> index 1c05c5b..f02e978 100644
> --- a/arch/arm/mach-ep93xx/crunch.c
> +++ b/arch/arm/mach-ep93xx/crunch.c
> @@ -49,8 +49,7 @@ static int crunch_do(struct notifier_block *self, unsigned long cmd, void *t)
> * FALLTHROUGH: Ensure we don't try to overwrite our newly
> * initialised state information on the first fault.
> */
> - /* Fall through */
> -
> + fallthrough;
> case THREAD_NOTIFY_EXIT:
> crunch_task_release(thread);
> break;
--
Alexander Sverdlin.
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 009/491] ARM/Amlogic Meson SoC support: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (7 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 008/491] ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: " Joe Perches
` (21 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Kevin Hilman
Cc: Ulf Hansson, linux-mmc, linux-arm-kernel, linux-amlogic, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/mmc/host/meson-mx-sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c
index 8b038e..d35d81 100644
--- a/drivers/mmc/host/meson-mx-sdio.c
+++ b/drivers/mmc/host/meson-mx-sdio.c
@@ -291,7 +291,7 @@ static void meson_mx_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
switch (ios->power_mode) {
case MMC_POWER_OFF:
vdd = 0;
- /* fall through */
+ fallthrough;
case MMC_POWER_UP:
if (!IS_ERR(mmc->supply.vmmc)) {
host->error = mmc_regulator_set_ocr(mmc,
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (8 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 009/491] ARM/Amlogic Meson SoC support: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-13 14:26 ` Wolfram Sang
2020-03-14 1:17 ` Stephen Boyd
2020-03-11 4:51 ` [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: " Joe Perches
` (20 subsequent siblings)
30 siblings, 2 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Kukjin Kim, Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
Chanwoo Choi
Cc: Michael Turquette, Stephen Boyd, linux-arm-kernel,
linux-samsung-soc, linux-clk, linux-kernel, linux-i2c
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/clk/samsung/clk-s3c2443.c | 2 +-
drivers/i2c/busses/i2c-s3c2410.c | 3 +--
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/samsung/clk-s3c2443.c b/drivers/clk/samsung/clk-s3c2443.c
index 5f30fe7..c7aba1e 100644
--- a/drivers/clk/samsung/clk-s3c2443.c
+++ b/drivers/clk/samsung/clk-s3c2443.c
@@ -387,7 +387,7 @@ void __init s3c2443_common_clk_init(struct device_node *np, unsigned long xti_f,
ARRAY_SIZE(s3c2450_gates));
samsung_clk_register_alias(ctx, s3c2450_aliases,
ARRAY_SIZE(s3c2450_aliases));
- /* fall through - as s3c2450 extends the s3c2416 clocks */
+ fallthrough; /* as s3c2450 extends the s3c2416 clocks */
case S3C2416:
samsung_clk_register_div(ctx, s3c2416_dividers,
ARRAY_SIZE(s3c2416_dividers));
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index c98ef4c..dd1264 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -435,8 +435,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
* fall through to the write state, as we will need to
* send a byte as well
*/
- /* Fall through */
-
+ fallthrough;
case STATE_WRITE:
/*
* we are writing data to the device... check for the
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: " Joe Perches
@ 2020-03-13 14:26 ` Wolfram Sang
2020-03-14 1:17 ` Stephen Boyd
1 sibling, 0 replies; 84+ messages in thread
From: Wolfram Sang @ 2020-03-13 14:26 UTC (permalink / raw)
To: Joe Perches
Cc: Kukjin Kim, Krzysztof Kozlowski, Sylwester Nawrocki, Tomasz Figa,
Chanwoo Choi, Michael Turquette, Stephen Boyd, linux-arm-kernel,
linux-samsung-soc, linux-clk, linux-kernel, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 375 bytes --]
On Tue, Mar 10, 2020 at 09:51:24PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Wolfram Sang <wsa@the-dreams.de> # for the I2C part
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: " Joe Perches
2020-03-13 14:26 ` Wolfram Sang
@ 2020-03-14 1:17 ` Stephen Boyd
2020-05-13 11:59 ` Sylwester Nawrocki
1 sibling, 1 reply; 84+ messages in thread
From: Stephen Boyd @ 2020-03-14 1:17 UTC (permalink / raw)
To: Chanwoo Choi, Joe Perches, Krzysztof Kozlowski, Kukjin Kim,
Sylwester Nawrocki, Tomasz Figa
Cc: Michael Turquette, linux-arm-kernel, linux-samsung-soc,
linux-clk, linux-kernel, linux-i2c
Quoting Joe Perches (2020-03-10 21:51:24)
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
This link doesn't work for me. It leads to a redirect for
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
> drivers/clk/samsung/clk-s3c2443.c | 2 +-
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: Use fallthrough;
2020-03-14 1:17 ` Stephen Boyd
@ 2020-05-13 11:59 ` Sylwester Nawrocki
0 siblings, 0 replies; 84+ messages in thread
From: Sylwester Nawrocki @ 2020-05-13 11:59 UTC (permalink / raw)
To: Stephen Boyd, Joe Perches
Cc: Chanwoo Choi, Krzysztof Kozlowski, Kukjin Kim, Tomasz Figa,
Michael Turquette, linux-arm-kernel, linux-samsung-soc,
linux-clk, linux-kernel, linux-i2c
On 14.03.2020 02:17, Stephen Boyd wrote:
> Quoting Joe Perches (2020-03-10 21:51:24)
>> Convert the various uses of fallthrough comments to fallthrough;
>>
>> Done via script
>> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>>
>
> This link doesn't work for me. It leads to a redirect for
>
> https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
>
>> drivers/clk/samsung/clk-s3c2443.c | 2 +-
>
> Reviewed-by: Stephen Boyd <sboyd@kernel.org>
I have changed the link to
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
and applied.
--
Thanks,
Sylwester
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (9 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 010/491] ARM/SAMSUNG EXYNOS ARM ARCHITECTURES: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 5:23 ` Amit Kucheria
` (2 more replies)
2020-03-11 4:51 ` [PATCH -next 012/491] ARM/ZTE ARCHITECTURE: " Joe Perches
` (19 subsequent siblings)
30 siblings, 3 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Stanimir Varbanov, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
Amit Kucheria
Cc: Mauro Carvalho Chehab, Kishon Vijay Abraham I, Linus Walleij,
Zhang Rui, Daniel Lezcano, linux-media, linux-arm-msm,
linux-kernel, linux-gpio, linux-remoteproc, linux-pm
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/media/platform/qcom/venus/vdec.c | 2 +-
drivers/phy/qualcomm/phy-qcom-usb-hs.c | 2 +-
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 ++--
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 2 +-
drivers/rpmsg/qcom_glink_native.c | 4 ++--
drivers/soc/qcom/socinfo.c | 16 ++++++++--------
drivers/thermal/qcom/tsens-v0_1.c | 8 ++++----
drivers/thermal/qcom/tsens-v1.c | 4 ++--
8 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index f34920..9e0451 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -983,7 +983,7 @@ static int vdec_stop_capture(struct venus_inst *inst)
switch (inst->codec_state) {
case VENUS_DEC_STATE_DECODING:
ret = hfi_session_flush(inst, HFI_FLUSH_ALL);
- /* fallthrough */
+ fallthrough;
case VENUS_DEC_STATE_DRAIN:
vdec_cancel_dst_buffers(inst);
inst->codec_state = VENUS_DEC_STATE_STOPPED;
diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hs.c b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
index 610542..327df1a 100644
--- a/drivers/phy/qualcomm/phy-qcom-usb-hs.c
+++ b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
@@ -53,7 +53,7 @@ static int qcom_usb_hs_phy_set_mode(struct phy *phy,
case PHY_MODE_USB_OTG:
case PHY_MODE_USB_HOST:
val |= ULPI_INT_IDGRD;
- /* fall through */
+ fallthrough;
case PHY_MODE_USB_DEVICE:
val |= ULPI_INT_SESS_VALID;
default:
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index fe0be8..3b0ab0e 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -793,13 +793,13 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
switch (subtype) {
case PMIC_GPIO_SUBTYPE_GPIO_4CH:
pad->have_buffer = true;
- /* Fall through */
+ fallthrough;
case PMIC_GPIO_SUBTYPE_GPIOC_4CH:
pad->num_sources = 4;
break;
case PMIC_GPIO_SUBTYPE_GPIO_8CH:
pad->have_buffer = true;
- /* Fall through */
+ fallthrough;
case PMIC_GPIO_SUBTYPE_GPIOC_8CH:
pad->num_sources = 8;
break;
diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index 338a15..b5949f7 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -346,7 +346,7 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
return -EINVAL;
}
pin->pull_up_strength = arg;
- /* FALLTHROUGH */
+ fallthrough;
case PIN_CONFIG_BIAS_PULL_UP:
pin->bias = pin->pull_up_strength;
banks |= BIT(2);
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 1995f5b..f40312 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -553,7 +553,7 @@ static void qcom_glink_receive_version(struct qcom_glink *glink,
break;
case GLINK_VERSION_1:
glink->features &= features;
- /* FALLTHROUGH */
+ fallthrough;
default:
qcom_glink_send_version_ack(glink);
break;
@@ -584,7 +584,7 @@ static void qcom_glink_receive_version_ack(struct qcom_glink *glink,
break;
glink->features &= features;
- /* FALLTHROUGH */
+ fallthrough;
default:
qcom_glink_send_version(glink);
break;
diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
index 7864b7..8ae5646 100644
--- a/drivers/soc/qcom/socinfo.c
+++ b/drivers/soc/qcom/socinfo.c
@@ -325,7 +325,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
debugfs_create_x32("raw_device_number", 0400,
qcom_socinfo->dbg_root,
&qcom_socinfo->info.raw_device_num);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 11):
case SOCINFO_VERSION(0, 10):
case SOCINFO_VERSION(0, 9):
@@ -333,12 +333,12 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root,
&qcom_socinfo->info.foundry_id);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 8):
case SOCINFO_VERSION(0, 7):
DEBUGFS_ADD(info, pmic_model);
DEBUGFS_ADD(info, pmic_die_rev);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 6):
qcom_socinfo->info.hw_plat_subtype =
__le32_to_cpu(info->hw_plat_subtype);
@@ -346,7 +346,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
debugfs_create_u32("hardware_platform_subtype", 0400,
qcom_socinfo->dbg_root,
&qcom_socinfo->info.hw_plat_subtype);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 5):
qcom_socinfo->info.accessory_chip =
__le32_to_cpu(info->accessory_chip);
@@ -354,27 +354,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
debugfs_create_u32("accessory_chip", 0400,
qcom_socinfo->dbg_root,
&qcom_socinfo->info.accessory_chip);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 4):
qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver);
debugfs_create_u32("platform_version", 0400,
qcom_socinfo->dbg_root,
&qcom_socinfo->info.plat_ver);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 3):
qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat);
debugfs_create_u32("hardware_platform", 0400,
qcom_socinfo->dbg_root,
&qcom_socinfo->info.hw_plat);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 2):
qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver);
debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root,
&qcom_socinfo->info.raw_ver);
- /* Fall through */
+ fallthrough;
case SOCINFO_VERSION(0, 1):
DEBUGFS_ADD(info, build_id);
break;
diff --git a/drivers/thermal/qcom/tsens-v0_1.c b/drivers/thermal/qcom/tsens-v0_1.c
index 4b8dd6..893ce1 100644
--- a/drivers/thermal/qcom/tsens-v0_1.c
+++ b/drivers/thermal/qcom/tsens-v0_1.c
@@ -163,7 +163,7 @@ static int calibrate_8916(struct tsens_priv *priv)
p2[4] = (qfprom_cdata[1] & MSM8916_S4_P2_MASK) >> MSM8916_S4_P2_SHIFT;
for (i = 0; i < priv->num_sensors; i++)
p2[i] = ((base1 + p2[i]) << 3);
- /* Fall through */
+ fallthrough;
case ONE_PT_CALIB2:
base0 = (qfprom_cdata[0] & MSM8916_BASE0_MASK);
p1[0] = (qfprom_cdata[0] & MSM8916_S0_P1_MASK) >> MSM8916_S0_P1_SHIFT;
@@ -228,7 +228,7 @@ static int calibrate_8974(struct tsens_priv *priv)
p2[8] = (calib[5] & S8_P2_BKP_MASK) >> S8_P2_BKP_SHIFT;
p2[9] = (calib[5] & S9_P2_BKP_MASK) >> S9_P2_BKP_SHIFT;
p2[10] = (calib[5] & S10_P2_BKP_MASK) >> S10_P2_BKP_SHIFT;
- /* Fall through */
+ fallthrough;
case ONE_PT_CALIB:
case ONE_PT_CALIB2:
base1 = bkp[0] & BASE1_MASK;
@@ -263,7 +263,7 @@ static int calibrate_8974(struct tsens_priv *priv)
p2[8] = (calib[4] & S8_P2_MASK) >> S8_P2_SHIFT;
p2[9] = (calib[4] & S9_P2_MASK) >> S9_P2_SHIFT;
p2[10] = (calib[4] & S10_P2_MASK) >> S10_P2_SHIFT;
- /* Fall through */
+ fallthrough;
case ONE_PT_CALIB:
case ONE_PT_CALIB2:
base1 = calib[0] & BASE1_MASK;
@@ -293,7 +293,7 @@ static int calibrate_8974(struct tsens_priv *priv)
p2[i] <<= 2;
p2[i] |= BIT_APPEND;
}
- /* Fall through */
+ fallthrough;
case ONE_PT_CALIB2:
for (i = 0; i < priv->num_sensors; i++) {
p1[i] += base1;
diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
index bd2ddb..d096d3 100644
--- a/drivers/thermal/qcom/tsens-v1.c
+++ b/drivers/thermal/qcom/tsens-v1.c
@@ -202,7 +202,7 @@ static int calibrate_v1(struct tsens_priv *priv)
p2[9] = (qfprom_cdata[3] & S9_P2_MASK) >> S9_P2_SHIFT;
for (i = 0; i < priv->num_sensors; i++)
p2[i] = ((base1 + p2[i]) << 2);
- /* Fall through */
+ fallthrough;
case ONE_PT_CALIB2:
base0 = (qfprom_cdata[4] & BASE0_MASK) >> BASE0_SHIFT;
p1[0] = (qfprom_cdata[0] & S0_P1_MASK) >> S0_P1_SHIFT;
@@ -263,7 +263,7 @@ static int calibrate_8976(struct tsens_priv *priv)
for (i = 0; i < priv->num_sensors; i++)
p2[i] = ((base1 + p2[i]) << 2);
- /* Fall through */
+ fallthrough;
case ONE_PT_CALIB2:
base0 = qfprom_cdata[0] & MSM8976_BASE0_MASK;
p1[0] = (qfprom_cdata[0] & MSM8976_S0_P1_MASK) >> MSM8976_S0_P1_SHIFT;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: " Joe Perches
@ 2020-03-11 5:23 ` Amit Kucheria
2020-03-11 8:46 ` Marc Gonzalez
2020-03-13 12:04 ` Stanimir Varbanov
2 siblings, 0 replies; 84+ messages in thread
From: Amit Kucheria @ 2020-03-11 5:23 UTC (permalink / raw)
To: Joe Perches
Cc: Stanimir Varbanov, Andy Gross, Bjorn Andersson, Ohad Ben-Cohen,
Mauro Carvalho Chehab, Kishon Vijay Abraham I, Linus Walleij,
Zhang Rui, Daniel Lezcano, linux-media, linux-arm-msm, LKML,
linux-gpio, linux-remoteproc, Linux PM list
On Wed, Mar 11, 2020 at 10:37 AM Joe Perches <joe@perches.com> wrote:
>
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 2 +-
> drivers/phy/qualcomm/phy-qcom-usb-hs.c | 2 +-
> drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 ++--
> drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 2 +-
> drivers/rpmsg/qcom_glink_native.c | 4 ++--
> drivers/soc/qcom/socinfo.c | 16 ++++++++--------
> drivers/thermal/qcom/tsens-v0_1.c | 8 ++++----
> drivers/thermal/qcom/tsens-v1.c | 4 ++--
> 8 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index f34920..9e0451 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -983,7 +983,7 @@ static int vdec_stop_capture(struct venus_inst *inst)
> switch (inst->codec_state) {
> case VENUS_DEC_STATE_DECODING:
> ret = hfi_session_flush(inst, HFI_FLUSH_ALL);
> - /* fallthrough */
> + fallthrough;
> case VENUS_DEC_STATE_DRAIN:
> vdec_cancel_dst_buffers(inst);
> inst->codec_state = VENUS_DEC_STATE_STOPPED;
> diff --git a/drivers/phy/qualcomm/phy-qcom-usb-hs.c b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
> index 610542..327df1a 100644
> --- a/drivers/phy/qualcomm/phy-qcom-usb-hs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-usb-hs.c
> @@ -53,7 +53,7 @@ static int qcom_usb_hs_phy_set_mode(struct phy *phy,
> case PHY_MODE_USB_OTG:
> case PHY_MODE_USB_HOST:
> val |= ULPI_INT_IDGRD;
> - /* fall through */
> + fallthrough;
> case PHY_MODE_USB_DEVICE:
> val |= ULPI_INT_SESS_VALID;
> default:
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index fe0be8..3b0ab0e 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -793,13 +793,13 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state,
> switch (subtype) {
> case PMIC_GPIO_SUBTYPE_GPIO_4CH:
> pad->have_buffer = true;
> - /* Fall through */
> + fallthrough;
> case PMIC_GPIO_SUBTYPE_GPIOC_4CH:
> pad->num_sources = 4;
> break;
> case PMIC_GPIO_SUBTYPE_GPIO_8CH:
> pad->have_buffer = true;
> - /* Fall through */
> + fallthrough;
> case PMIC_GPIO_SUBTYPE_GPIOC_8CH:
> pad->num_sources = 8;
> break;
> diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> index 338a15..b5949f7 100644
> --- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
> @@ -346,7 +346,7 @@ static int pm8xxx_pin_config_set(struct pinctrl_dev *pctldev,
> return -EINVAL;
> }
> pin->pull_up_strength = arg;
> - /* FALLTHROUGH */
> + fallthrough;
> case PIN_CONFIG_BIAS_PULL_UP:
> pin->bias = pin->pull_up_strength;
> banks |= BIT(2);
> diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
> index 1995f5b..f40312 100644
> --- a/drivers/rpmsg/qcom_glink_native.c
> +++ b/drivers/rpmsg/qcom_glink_native.c
> @@ -553,7 +553,7 @@ static void qcom_glink_receive_version(struct qcom_glink *glink,
> break;
> case GLINK_VERSION_1:
> glink->features &= features;
> - /* FALLTHROUGH */
> + fallthrough;
> default:
> qcom_glink_send_version_ack(glink);
> break;
> @@ -584,7 +584,7 @@ static void qcom_glink_receive_version_ack(struct qcom_glink *glink,
> break;
>
> glink->features &= features;
> - /* FALLTHROUGH */
> + fallthrough;
> default:
> qcom_glink_send_version(glink);
> break;
> diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c
> index 7864b7..8ae5646 100644
> --- a/drivers/soc/qcom/socinfo.c
> +++ b/drivers/soc/qcom/socinfo.c
> @@ -325,7 +325,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
> debugfs_create_x32("raw_device_number", 0400,
> qcom_socinfo->dbg_root,
> &qcom_socinfo->info.raw_device_num);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 11):
> case SOCINFO_VERSION(0, 10):
> case SOCINFO_VERSION(0, 9):
> @@ -333,12 +333,12 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
>
> debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root,
> &qcom_socinfo->info.foundry_id);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 8):
> case SOCINFO_VERSION(0, 7):
> DEBUGFS_ADD(info, pmic_model);
> DEBUGFS_ADD(info, pmic_die_rev);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 6):
> qcom_socinfo->info.hw_plat_subtype =
> __le32_to_cpu(info->hw_plat_subtype);
> @@ -346,7 +346,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
> debugfs_create_u32("hardware_platform_subtype", 0400,
> qcom_socinfo->dbg_root,
> &qcom_socinfo->info.hw_plat_subtype);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 5):
> qcom_socinfo->info.accessory_chip =
> __le32_to_cpu(info->accessory_chip);
> @@ -354,27 +354,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo,
> debugfs_create_u32("accessory_chip", 0400,
> qcom_socinfo->dbg_root,
> &qcom_socinfo->info.accessory_chip);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 4):
> qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver);
>
> debugfs_create_u32("platform_version", 0400,
> qcom_socinfo->dbg_root,
> &qcom_socinfo->info.plat_ver);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 3):
> qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat);
>
> debugfs_create_u32("hardware_platform", 0400,
> qcom_socinfo->dbg_root,
> &qcom_socinfo->info.hw_plat);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 2):
> qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver);
>
> debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root,
> &qcom_socinfo->info.raw_ver);
> - /* Fall through */
> + fallthrough;
> case SOCINFO_VERSION(0, 1):
> DEBUGFS_ADD(info, build_id);
> break;
> diff --git a/drivers/thermal/qcom/tsens-v0_1.c b/drivers/thermal/qcom/tsens-v0_1.c
> index 4b8dd6..893ce1 100644
> --- a/drivers/thermal/qcom/tsens-v0_1.c
> +++ b/drivers/thermal/qcom/tsens-v0_1.c
> @@ -163,7 +163,7 @@ static int calibrate_8916(struct tsens_priv *priv)
> p2[4] = (qfprom_cdata[1] & MSM8916_S4_P2_MASK) >> MSM8916_S4_P2_SHIFT;
> for (i = 0; i < priv->num_sensors; i++)
> p2[i] = ((base1 + p2[i]) << 3);
> - /* Fall through */
> + fallthrough;
> case ONE_PT_CALIB2:
> base0 = (qfprom_cdata[0] & MSM8916_BASE0_MASK);
> p1[0] = (qfprom_cdata[0] & MSM8916_S0_P1_MASK) >> MSM8916_S0_P1_SHIFT;
> @@ -228,7 +228,7 @@ static int calibrate_8974(struct tsens_priv *priv)
> p2[8] = (calib[5] & S8_P2_BKP_MASK) >> S8_P2_BKP_SHIFT;
> p2[9] = (calib[5] & S9_P2_BKP_MASK) >> S9_P2_BKP_SHIFT;
> p2[10] = (calib[5] & S10_P2_BKP_MASK) >> S10_P2_BKP_SHIFT;
> - /* Fall through */
> + fallthrough;
> case ONE_PT_CALIB:
> case ONE_PT_CALIB2:
> base1 = bkp[0] & BASE1_MASK;
> @@ -263,7 +263,7 @@ static int calibrate_8974(struct tsens_priv *priv)
> p2[8] = (calib[4] & S8_P2_MASK) >> S8_P2_SHIFT;
> p2[9] = (calib[4] & S9_P2_MASK) >> S9_P2_SHIFT;
> p2[10] = (calib[4] & S10_P2_MASK) >> S10_P2_SHIFT;
> - /* Fall through */
> + fallthrough;
> case ONE_PT_CALIB:
> case ONE_PT_CALIB2:
> base1 = calib[0] & BASE1_MASK;
> @@ -293,7 +293,7 @@ static int calibrate_8974(struct tsens_priv *priv)
> p2[i] <<= 2;
> p2[i] |= BIT_APPEND;
> }
> - /* Fall through */
> + fallthrough;
> case ONE_PT_CALIB2:
> for (i = 0; i < priv->num_sensors; i++) {
> p1[i] += base1;
> diff --git a/drivers/thermal/qcom/tsens-v1.c b/drivers/thermal/qcom/tsens-v1.c
> index bd2ddb..d096d3 100644
> --- a/drivers/thermal/qcom/tsens-v1.c
> +++ b/drivers/thermal/qcom/tsens-v1.c
> @@ -202,7 +202,7 @@ static int calibrate_v1(struct tsens_priv *priv)
> p2[9] = (qfprom_cdata[3] & S9_P2_MASK) >> S9_P2_SHIFT;
> for (i = 0; i < priv->num_sensors; i++)
> p2[i] = ((base1 + p2[i]) << 2);
> - /* Fall through */
> + fallthrough;
> case ONE_PT_CALIB2:
> base0 = (qfprom_cdata[4] & BASE0_MASK) >> BASE0_SHIFT;
> p1[0] = (qfprom_cdata[0] & S0_P1_MASK) >> S0_P1_SHIFT;
> @@ -263,7 +263,7 @@ static int calibrate_8976(struct tsens_priv *priv)
>
> for (i = 0; i < priv->num_sensors; i++)
> p2[i] = ((base1 + p2[i]) << 2);
> - /* Fall through */
> + fallthrough;
> case ONE_PT_CALIB2:
> base0 = qfprom_cdata[0] & MSM8976_BASE0_MASK;
> p1[0] = (qfprom_cdata[0] & MSM8976_S0_P1_MASK) >> MSM8976_S0_P1_SHIFT;
> --
> 2.24.0
>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: " Joe Perches
2020-03-11 5:23 ` Amit Kucheria
@ 2020-03-11 8:46 ` Marc Gonzalez
2020-03-11 14:30 ` Joe Perches
2020-03-13 12:04 ` Stanimir Varbanov
2 siblings, 1 reply; 84+ messages in thread
From: Marc Gonzalez @ 2020-03-11 8:46 UTC (permalink / raw)
To: Joe Perches; +Cc: LKML, Linux ARM
[ Trimming recipients list ]
On 11/03/2020 05:51, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
What is the rationale for such a change?
Portability to different tool-chains? Something else?
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Message-ID <b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com>
not found
1 partial match found:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: Use fallthrough;
2020-03-11 8:46 ` Marc Gonzalez
@ 2020-03-11 14:30 ` Joe Perches
0 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 14:30 UTC (permalink / raw)
To: Marc Gonzalez; +Cc: LKML, Linux ARM
On Wed, 2020-03-11 at 09:46 +0100, Marc Gonzalez wrote:
> On 11/03/2020 05:51, Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
>
> What is the rationale for such a change?
> Portability to different tool-chains? Something else?
Converting /* fallthrough */ style comments to the pseudo-keyword fallthrough
allows clang 10 and higher to work at finding missing fallthroughs too.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: " Joe Perches
2020-03-11 5:23 ` Amit Kucheria
2020-03-11 8:46 ` Marc Gonzalez
@ 2020-03-13 12:04 ` Stanimir Varbanov
2 siblings, 0 replies; 84+ messages in thread
From: Stanimir Varbanov @ 2020-03-13 12:04 UTC (permalink / raw)
To: Joe Perches, Stanimir Varbanov, Andy Gross, Bjorn Andersson,
Ohad Ben-Cohen, Amit Kucheria
Cc: Mauro Carvalho Chehab, Kishon Vijay Abraham I, Linus Walleij,
Zhang Rui, Daniel Lezcano, linux-media, linux-arm-msm,
linux-kernel, linux-gpio, linux-remoteproc, linux-pm
Hi,
On 3/11/20 6:51 AM, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 2 +-
For the Venus bits:
Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> drivers/phy/qualcomm/phy-qcom-usb-hs.c | 2 +-
> drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 4 ++--
> drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 2 +-
> drivers/rpmsg/qcom_glink_native.c | 4 ++--
> drivers/soc/qcom/socinfo.c | 16 ++++++++--------
> drivers/thermal/qcom/tsens-v0_1.c | 8 ++++----
> drivers/thermal/qcom/tsens-v1.c | 4 ++--
> 8 files changed, 21 insertions(+), 21 deletions(-)
>
--
regards,
Stan
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 012/491] ARM/ZTE ARCHITECTURE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (10 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 011/491] ARM/QUALCOMM SUPPORT: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 013/491] INGENIC JZ47xx SoCs: " Joe Perches
` (18 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Jun Nie, Shawn Guo
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
linux-arm-kernel, alsa-devel, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
sound/soc/zte/zx-i2s.c | 4 ++--
sound/soc/zte/zx-spdif.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/zte/zx-i2s.c b/sound/soc/zte/zx-i2s.c
index 568cde6..1c1a44 100644
--- a/sound/soc/zte/zx-i2s.c
+++ b/sound/soc/zte/zx-i2s.c
@@ -294,7 +294,7 @@ static int zx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
zx_i2s_rx_dma_en(zx_i2s->reg_base, true);
else
zx_i2s_tx_dma_en(zx_i2s->reg_base, true);
- /* fall thru */
+ fallthrough;
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
if (capture)
@@ -308,7 +308,7 @@ static int zx_i2s_trigger(struct snd_pcm_substream *substream, int cmd,
zx_i2s_rx_dma_en(zx_i2s->reg_base, false);
else
zx_i2s_tx_dma_en(zx_i2s->reg_base, false);
- /* fall thru */
+ fallthrough;
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
if (capture)
diff --git a/sound/soc/zte/zx-spdif.c b/sound/soc/zte/zx-spdif.c
index a3a07c0..b4168bd 100644
--- a/sound/soc/zte/zx-spdif.c
+++ b/sound/soc/zte/zx-spdif.c
@@ -218,7 +218,7 @@ static int zx_spdif_trigger(struct snd_pcm_substream *substream, int cmd,
val = readl_relaxed(zx_spdif->reg_base + ZX_FIFOCTRL);
val |= ZX_FIFOCTRL_TX_FIFO_RST;
writel_relaxed(val, zx_spdif->reg_base + ZX_FIFOCTRL);
- /* fall thru */
+ fallthrough;
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
zx_spdif_cfg_tx(zx_spdif->reg_base, true);
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH -next 013/491] INGENIC JZ47xx SoCs: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (11 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 012/491] ARM/ZTE ARCHITECTURE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 7:40 ` Miquel Raynal
2020-03-11 4:51 ` [PATCH -next 014/491] DECSTATION PLATFORM SUPPORT: " Joe Perches
` (17 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Paul Cercueil, Harvey Hunt
Cc: David Airlie, Daniel Vetter, Ulf Hansson, Miquel Raynal,
Richard Weinberger, Vignesh Raghavendra, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, dri-devel,
linux-kernel, linux-mmc, linux-mtd, alsa-devel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +-
drivers/mmc/host/jz4740_mmc.c | 6 ++----
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
drivers/mtd/nand/raw/ingenic/jz4725b_bch.c | 4 ++--
drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 4 ++--
sound/soc/codecs/jz4770.c | 2 +-
6 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index 9dfe7c..8eefe7 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -305,7 +305,7 @@ static void ingenic_drm_crtc_update_ctrl(struct ingenic_drm *priv,
switch (finfo->format) {
case DRM_FORMAT_XRGB1555:
ctrl |= JZ_LCD_CTRL_RGB555;
- /* fall-through */
+ fallthrough;
case DRM_FORMAT_RGB565:
ctrl |= JZ_LCD_CTRL_BPP_15_16;
break;
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index fbae87..9026af6 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -737,8 +737,7 @@ static irqreturn_t jz_mmc_irq_worker(int irq, void *devid)
break;
jz_mmc_prepare_data_transfer(host);
- /* fall through */
-
+ fallthrough;
case JZ4740_MMC_STATE_TRANSFER_DATA:
if (host->use_dma) {
/* Use DMA if enabled.
@@ -772,8 +771,7 @@ static irqreturn_t jz_mmc_irq_worker(int irq, void *devid)
break;
}
jz4740_mmc_write_irq_reg(host, JZ_MMC_IRQ_DATA_TRAN_DONE);
- /* fall through */
-
+ fallthrough;
case JZ4740_MMC_STATE_SEND_STOP:
if (!req->stop)
break;
diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
index 49afeb..935c49 100644
--- a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
+++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c
@@ -253,7 +253,7 @@ static int ingenic_nand_attach_chip(struct nand_chip *chip)
chip->ecc.hwctl = ingenic_nand_ecc_hwctl;
chip->ecc.calculate = ingenic_nand_ecc_calculate;
chip->ecc.correct = ingenic_nand_ecc_correct;
- /* fall through */
+ fallthrough;
case NAND_ECC_SOFT:
dev_info(nfc->dev, "using %s (strength %d, size %d, bytes %d)\n",
(nfc->ecc) ? "hardware ECC" : "software ECC",
diff --git a/drivers/mtd/nand/raw/ingenic/jz4725b_bch.c b/drivers/mtd/nand/raw/ingenic/jz4725b_bch.c
index 6c852ea..2d0e0a 100644
--- a/drivers/mtd/nand/raw/ingenic/jz4725b_bch.c
+++ b/drivers/mtd/nand/raw/ingenic/jz4725b_bch.c
@@ -145,10 +145,10 @@ static void jz4725b_bch_read_parity(struct ingenic_ecc *bch, u8 *buf,
switch (size8) {
case 3:
dest8[2] = (val >> 16) & 0xff;
- /* fall-through */
+ fallthrough;
case 2:
dest8[1] = (val >> 8) & 0xff;
- /* fall-through */
+ fallthrough;
case 1:
dest8[0] = val & 0xff;
break;
diff --git a/drivers/mtd/nand/raw/ingenic/jz4780_bch.c b/drivers/mtd/nand/raw/ingenic/jz4780_bch.c
index 079266a..d67dbf 100644
--- a/drivers/mtd/nand/raw/ingenic/jz4780_bch.c
+++ b/drivers/mtd/nand/raw/ingenic/jz4780_bch.c
@@ -123,10 +123,10 @@ static void jz4780_bch_read_parity(struct ingenic_ecc *bch, void *buf,
switch (size8) {
case 3:
dest8[2] = (val >> 16) & 0xff;
- /* fall through */
+ fallthrough;
case 2:
dest8[1] = (val >> 8) & 0xff;
- /* fall through */
+ fallthrough;
case 1:
dest8[0] = val & 0xff;
break;
diff --git a/sound/soc/codecs/jz4770.c b/sound/soc/codecs/jz4770.c
index e7cf2c..6e2a91 100644
--- a/sound/soc/codecs/jz4770.c
+++ b/sound/soc/codecs/jz4770.c
@@ -202,7 +202,7 @@ static int jz4770_codec_set_bias_level(struct snd_soc_component *codec,
REG_CR_VIC_SB_SLEEP, REG_CR_VIC_SB_SLEEP);
regmap_update_bits(regmap, JZ4770_CODEC_REG_CR_VIC,
REG_CR_VIC_SB, REG_CR_VIC_SB);
- /* fall-through */
+ fallthrough;
default:
break;
}
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 013/491] INGENIC JZ47xx SoCs: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 013/491] INGENIC JZ47xx SoCs: " Joe Perches
@ 2020-03-11 7:40 ` Miquel Raynal
2020-03-11 14:20 ` Ulf Hansson
2020-03-12 6:26 ` Joe Perches
0 siblings, 2 replies; 84+ messages in thread
From: Miquel Raynal @ 2020-03-11 7:40 UTC (permalink / raw)
To: Joe Perches
Cc: Paul Cercueil, Harvey Hunt, David Airlie, Daniel Vetter,
Ulf Hansson, Richard Weinberger, Vignesh Raghavendra,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
dri-devel, linux-kernel, linux-mmc, linux-mtd, alsa-devel
Hi Joe,
Joe Perches <joe@perches.com> wrote on Tue, 10 Mar 2020 21:51:27 -0700:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +-
> drivers/mmc/host/jz4740_mmc.c | 6 ++----
> drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
> drivers/mtd/nand/raw/ingenic/jz4725b_bch.c | 4 ++--
> drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 4 ++--
> sound/soc/codecs/jz4770.c | 2 +-
> 6 files changed, 9 insertions(+), 11 deletions(-)
I like very much the new way to advertise for fallthrough statements,
but I am not willing to take any patch converting a single driver
anymore. I had too many from Gustavo when these comments had to be
inserted. I would really prefer a MTD-wide or a NAND-wide or at least a
raw-NAND-wide single patch (anything inside drivers/mtd/nand/raw/).
Hope you'll understand!
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 013/491] INGENIC JZ47xx SoCs: Use fallthrough;
2020-03-11 7:40 ` Miquel Raynal
@ 2020-03-11 14:20 ` Ulf Hansson
2020-03-11 14:29 ` Miquel Raynal
2020-03-12 6:26 ` Joe Perches
1 sibling, 1 reply; 84+ messages in thread
From: Ulf Hansson @ 2020-03-11 14:20 UTC (permalink / raw)
To: Miquel Raynal, Joe Perches
Cc: Paul Cercueil, Harvey Hunt, David Airlie, Daniel Vetter,
Richard Weinberger, Vignesh Raghavendra, Liam Girdwood,
Mark Brown, Jaroslav Kysela, Takashi Iwai, dri-devel,
Linux Kernel Mailing List, linux-mmc, linux-mtd, alsa-devel
On Wed, 11 Mar 2020 at 08:40, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>
> Hi Joe,
>
> Joe Perches <joe@perches.com> wrote on Tue, 10 Mar 2020 21:51:27 -0700:
>
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +-
> > drivers/mmc/host/jz4740_mmc.c | 6 ++----
> > drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
> > drivers/mtd/nand/raw/ingenic/jz4725b_bch.c | 4 ++--
> > drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 4 ++--
> > sound/soc/codecs/jz4770.c | 2 +-
> > 6 files changed, 9 insertions(+), 11 deletions(-)
>
> I like very much the new way to advertise for fallthrough statements,
> but I am not willing to take any patch converting a single driver
> anymore. I had too many from Gustavo when these comments had to be
> inserted. I would really prefer a MTD-wide or a NAND-wide or at least a
> raw-NAND-wide single patch (anything inside drivers/mtd/nand/raw/).
>
> Hope you'll understand!
I fully agree (for mmc). One patch please.
Another option is to make a big fat tree wide patch and ask Linus if
he want to pick up immediately after an rc1. That should cause less
disturbance for everyone, no?
Kind regards
Uffe
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 013/491] INGENIC JZ47xx SoCs: Use fallthrough;
2020-03-11 14:20 ` Ulf Hansson
@ 2020-03-11 14:29 ` Miquel Raynal
0 siblings, 0 replies; 84+ messages in thread
From: Miquel Raynal @ 2020-03-11 14:29 UTC (permalink / raw)
To: Ulf Hansson
Cc: Joe Perches, Paul Cercueil, Harvey Hunt, David Airlie,
Daniel Vetter, Richard Weinberger, Vignesh Raghavendra,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
dri-devel, Linux Kernel Mailing List, linux-mmc, linux-mtd,
alsa-devel
Ulf Hansson <ulf.hansson@linaro.org> wrote on Wed, 11 Mar 2020 15:20:59
+0100:
> On Wed, 11 Mar 2020 at 08:40, Miquel Raynal <miquel.raynal@bootlin.com> wrote:
> >
> > Hi Joe,
> >
> > Joe Perches <joe@perches.com> wrote on Tue, 10 Mar 2020 21:51:27 -0700:
> >
> > > Convert the various uses of fallthrough comments to fallthrough;
> > >
> > > Done via script
> > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> > > ---
> > > drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +-
> > > drivers/mmc/host/jz4740_mmc.c | 6 ++----
> > > drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
> > > drivers/mtd/nand/raw/ingenic/jz4725b_bch.c | 4 ++--
> > > drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 4 ++--
> > > sound/soc/codecs/jz4770.c | 2 +-
> > > 6 files changed, 9 insertions(+), 11 deletions(-)
> >
> > I like very much the new way to advertise for fallthrough statements,
> > but I am not willing to take any patch converting a single driver
> > anymore. I had too many from Gustavo when these comments had to be
> > inserted. I would really prefer a MTD-wide or a NAND-wide or at least a
> > raw-NAND-wide single patch (anything inside drivers/mtd/nand/raw/).
> >
> > Hope you'll understand!
>
> I fully agree (for mmc). One patch please.
>
> Another option is to make a big fat tree wide patch and ask Linus if
> he want to pick up immediately after an rc1. That should cause less
> disturbance for everyone, no?
Absolutely.
Miquèl
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 013/491] INGENIC JZ47xx SoCs: Use fallthrough;
2020-03-11 7:40 ` Miquel Raynal
2020-03-11 14:20 ` Ulf Hansson
@ 2020-03-12 6:26 ` Joe Perches
1 sibling, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-12 6:26 UTC (permalink / raw)
To: Miquel Raynal
Cc: Paul Cercueil, Harvey Hunt, David Airlie, Daniel Vetter,
Ulf Hansson, Richard Weinberger, Vignesh Raghavendra,
Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
dri-devel, linux-kernel, linux-mmc, linux-mtd, alsa-devel
On Wed, 2020-03-11 at 08:40 +0100, Miquel Raynal wrote:
> Hi Joe,
>
> Joe Perches <joe@perches.com> wrote on Tue, 10 Mar 2020 21:51:27 -0700:
>
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
> > ---
> > drivers/gpu/drm/ingenic/ingenic-drm.c | 2 +-
> > drivers/mmc/host/jz4740_mmc.c | 6 ++----
> > drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 2 +-
> > drivers/mtd/nand/raw/ingenic/jz4725b_bch.c | 4 ++--
> > drivers/mtd/nand/raw/ingenic/jz4780_bch.c | 4 ++--
> > sound/soc/codecs/jz4770.c | 2 +-
> > 6 files changed, 9 insertions(+), 11 deletions(-)
>
> I like very much the new way to advertise for fallthrough statements,
> but I am not willing to take any patch converting a single driver
> anymore. I had too many from Gustavo when these comments had to be
> inserted. I would really prefer a MTD-wide or a NAND-wide or at least a
> raw-NAND-wide single patch (anything inside drivers/mtd/nand/raw/).
I understand completely.
This set was done to generate patches by
nominally maintained subsystems.
If you want something else:
The easiest thing for you to do would be to
run the cvt_fallthrough.pl script yourself.
$ cvt_fallthrough.pl drivers/mtd/nand/raw/
That would produce:
$ git diff --shortstat drivers/mtd/nand/raw
9 files changed, 18 insertions(+), 24 deletions(-)
or
$ cvt_fallthrough.pl drivers/mtd/
which would produce:
$ git diff --shortstat drivers/mtd/
22 files changed, 45 insertions(+), 60 deletions(-)
cheers, Joe
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 014/491] DECSTATION PLATFORM SUPPORT: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (12 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 013/491] INGENIC JZ47xx SoCs: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 19:19 ` Thomas Bogendoerfer
2020-03-11 4:51 ` [PATCH -next 015/491] KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips): " Joe Perches
` (16 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Thomas Bogendoerfer, linux-mips, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/mips/dec/tc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/dec/tc.c b/arch/mips/dec/tc.c
index 732027c..dba583 100644
--- a/arch/mips/dec/tc.c
+++ b/arch/mips/dec/tc.c
@@ -52,7 +52,7 @@ int __init tc_bus_get_info(struct tc_bus *tbus)
case MACH_DS5900:
tbus->ext_slot_base = 0x20000000;
tbus->ext_slot_size = 0x20000000;
- /* fall through */
+ fallthrough;
case MACH_DS5000_1XX:
tbus->num_tcslots = 3;
break;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 014/491] DECSTATION PLATFORM SUPPORT: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 014/491] DECSTATION PLATFORM SUPPORT: " Joe Perches
@ 2020-03-11 19:19 ` Thomas Bogendoerfer
0 siblings, 0 replies; 84+ messages in thread
From: Thomas Bogendoerfer @ 2020-03-11 19:19 UTC (permalink / raw)
To: Joe Perches; +Cc: Maciej W. Rozycki, linux-mips, linux-kernel
On Tue, Mar 10, 2020 at 09:51:28PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/mips/dec/tc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/dec/tc.c b/arch/mips/dec/tc.c
> index 732027c..dba583 100644
> --- a/arch/mips/dec/tc.c
> +++ b/arch/mips/dec/tc.c
> @@ -52,7 +52,7 @@ int __init tc_bus_get_info(struct tc_bus *tbus)
> case MACH_DS5900:
> tbus->ext_slot_base = 0x20000000;
> tbus->ext_slot_size = 0x20000000;
> - /* fall through */
> + fallthrough;
> case MACH_DS5000_1XX:
> tbus->num_tcslots = 3;
> break;
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 015/491] KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips): Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (13 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 014/491] DECSTATION PLATFORM SUPPORT: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 19:20 ` Thomas Bogendoerfer
2020-03-11 4:51 ` [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): " Joe Perches
` (15 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Thomas Bogendoerfer, linux-mips, kvm
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/mips/kvm/emulate.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index 754094..8c80333 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -64,7 +64,7 @@ static int kvm_compute_return_epc(struct kvm_vcpu *vcpu, unsigned long instpc,
switch (insn.r_format.func) {
case jalr_op:
arch->gprs[insn.r_format.rd] = epc + 8;
- /* Fall through */
+ fallthrough;
case jr_op:
nextpc = arch->gprs[insn.r_format.rs];
break;
@@ -140,7 +140,7 @@ static int kvm_compute_return_epc(struct kvm_vcpu *vcpu, unsigned long instpc,
/* These are unconditional and in j_format. */
case jal_op:
arch->gprs[31] = instpc + 8;
- /* fall through */
+ fallthrough;
case j_op:
epc += 4;
epc >>= 28;
@@ -1724,14 +1724,14 @@ enum emulation_result kvm_mips_emulate_load(union mips_instruction inst,
case lhu_op:
vcpu->mmio_needed = 1; /* unsigned */
- /* fall through */
+ fallthrough;
case lh_op:
run->mmio.len = 2;
break;
case lbu_op:
vcpu->mmio_needed = 1; /* unsigned */
- /* fall through */
+ fallthrough;
case lb_op:
run->mmio.len = 1;
break;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 015/491] KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips): Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 015/491] KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips): " Joe Perches
@ 2020-03-11 19:20 ` Thomas Bogendoerfer
0 siblings, 0 replies; 84+ messages in thread
From: Thomas Bogendoerfer @ 2020-03-11 19:20 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, linux-mips, kvm
On Tue, Mar 10, 2020 at 09:51:29PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/mips/kvm/emulate.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (14 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 015/491] KERNEL VIRTUAL MACHINE FOR MIPS (KVM/mips): " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-19 1:18 ` Paul Mackerras
2020-03-11 4:51 ` [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: " Joe Perches
` (14 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Paul Mackerras
Cc: Benjamin Herrenschmidt, Michael Ellerman, kvm-ppc, linuxppc-dev,
linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/powerpc/kvm/book3s_32_mmu.c | 2 +-
arch/powerpc/kvm/book3s_64_mmu.c | 2 +-
arch/powerpc/kvm/book3s_pr.c | 2 +-
arch/powerpc/kvm/booke.c | 6 +++---
arch/powerpc/kvm/powerpc.c | 1 -
5 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_32_mmu.c b/arch/powerpc/kvm/book3s_32_mmu.c
index f21e734..3fbd57 100644
--- a/arch/powerpc/kvm/book3s_32_mmu.c
+++ b/arch/powerpc/kvm/book3s_32_mmu.c
@@ -234,7 +234,7 @@ static int kvmppc_mmu_book3s_32_xlate_pte(struct kvm_vcpu *vcpu, gva_t eaddr,
case 2:
case 6:
pte->may_write = true;
- /* fall through */
+ fallthrough;
case 3:
case 5:
case 7:
diff --git a/arch/powerpc/kvm/book3s_64_mmu.c b/arch/powerpc/kvm/book3s_64_mmu.c
index 5991332..26b8b2 100644
--- a/arch/powerpc/kvm/book3s_64_mmu.c
+++ b/arch/powerpc/kvm/book3s_64_mmu.c
@@ -311,7 +311,7 @@ static int kvmppc_mmu_book3s_64_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
case 2:
case 6:
gpte->may_write = true;
- /* fall through */
+ fallthrough;
case 3:
case 5:
case 7:
diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
index 729a0f..7db3695 100644
--- a/arch/powerpc/kvm/book3s_pr.c
+++ b/arch/powerpc/kvm/book3s_pr.c
@@ -740,7 +740,7 @@ int kvmppc_handle_pagefault(struct kvm_run *run, struct kvm_vcpu *vcpu,
(vcpu->arch.hflags & BOOK3S_HFLAG_SPLIT_HACK) &&
((pte.raddr & SPLIT_HACK_MASK) == SPLIT_HACK_OFFS))
pte.raddr &= ~SPLIT_HACK_MASK;
- /* fall through */
+ fallthrough;
case MSR_IR:
vcpu->arch.mmu.esid_to_vsid(vcpu, eaddr >> SID_SHIFT, &vsid);
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 7b27604..be47815 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -421,11 +421,11 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
case BOOKE_IRQPRIO_DATA_STORAGE:
case BOOKE_IRQPRIO_ALIGNMENT:
update_dear = true;
- /* fall through */
+ fallthrough;
case BOOKE_IRQPRIO_INST_STORAGE:
case BOOKE_IRQPRIO_PROGRAM:
update_esr = true;
- /* fall through */
+ fallthrough;
case BOOKE_IRQPRIO_ITLB_MISS:
case BOOKE_IRQPRIO_SYSCALL:
case BOOKE_IRQPRIO_FP_UNAVAIL:
@@ -459,7 +459,7 @@ static int kvmppc_booke_irqprio_deliver(struct kvm_vcpu *vcpu,
case BOOKE_IRQPRIO_DECREMENTER:
case BOOKE_IRQPRIO_FIT:
keep_irq = true;
- /* fall through */
+ fallthrough;
case BOOKE_IRQPRIO_EXTERNAL:
case BOOKE_IRQPRIO_DBELL:
allowed = vcpu->arch.shared->msr & MSR_EE;
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 1af96fb5..c242a79 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -525,7 +525,6 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
r = 1;
break;
case KVM_CAP_PPC_GUEST_DEBUG_SSTEP:
- /* fall through */
case KVM_CAP_PPC_PAIRED_SINGLES:
case KVM_CAP_PPC_OSI:
case KVM_CAP_PPC_GET_PVINFO:
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): " Joe Perches
@ 2020-03-19 1:18 ` Paul Mackerras
2020-03-19 1:22 ` Joe Perches
0 siblings, 1 reply; 84+ messages in thread
From: Paul Mackerras @ 2020-03-19 1:18 UTC (permalink / raw)
To: Joe Perches
Cc: Benjamin Herrenschmidt, Michael Ellerman, kvm-ppc, linuxppc-dev,
linux-kernel
On Tue, Mar 10, 2020 at 09:51:30PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
The subject line should look like "KVM: PPC: Use fallthrough".
Apart from that,
Acked-by: Paul Mackerras <paulus@ozlabs.org>
How are these patches going upstream? Do you want me to take this via
my tree?
Paul.
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;
2020-03-19 1:18 ` Paul Mackerras
@ 2020-03-19 1:22 ` Joe Perches
2020-03-19 23:33 ` Paul Mackerras
0 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-19 1:22 UTC (permalink / raw)
To: Paul Mackerras
Cc: Benjamin Herrenschmidt, Michael Ellerman, kvm-ppc, linuxppc-dev,
linux-kernel
On Thu, 2020-03-19 at 12:18 +1100, Paul Mackerras wrote:
> On Tue, Mar 10, 2020 at 09:51:30PM -0700, Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > Signed-off-by: Joe Perches <joe@perches.com>
>
> The subject line should look like "KVM: PPC: Use fallthrough".
There's no way to generate a subject line like that via a script
so far as I can tell.
> Apart from that,
>
> Acked-by: Paul Mackerras <paulus@ozlabs.org>
>
> How are these patches going upstream? Do you want me to take this via
> my tree?
If you want.
Ideally, these changes would go in treewide via a script run
by Linus at an -rc1, but if the change is OK with you, it'd
be fine to have you apply it now.
cheers, Joe
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): Use fallthrough;
2020-03-19 1:22 ` Joe Perches
@ 2020-03-19 23:33 ` Paul Mackerras
0 siblings, 0 replies; 84+ messages in thread
From: Paul Mackerras @ 2020-03-19 23:33 UTC (permalink / raw)
To: Joe Perches
Cc: Benjamin Herrenschmidt, Michael Ellerman, kvm-ppc, linuxppc-dev,
linux-kernel
On Wed, Mar 18, 2020 at 06:22:29PM -0700, Joe Perches wrote:
> On Thu, 2020-03-19 at 12:18 +1100, Paul Mackerras wrote:
> > On Tue, Mar 10, 2020 at 09:51:30PM -0700, Joe Perches wrote:
> > > Convert the various uses of fallthrough comments to fallthrough;
> > >
> > > Done via script
> > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> > >
> > > Signed-off-by: Joe Perches <joe@perches.com>
> >
> > The subject line should look like "KVM: PPC: Use fallthrough".
>
> There's no way to generate a subject line like that via a script
> so far as I can tell.
>
> > Apart from that,
> >
> > Acked-by: Paul Mackerras <paulus@ozlabs.org>
> >
> > How are these patches going upstream? Do you want me to take this via
> > my tree?
>
> If you want.
>
> Ideally, these changes would go in treewide via a script run
> by Linus at an -rc1, but if the change is OK with you, it'd
> be fine to have you apply it now.
I have taken this patch in my kvm-ppc-next branch.
Thanks,
Paul.
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (15 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 016/491] KERNEL VIRTUAL MACHINE FOR POWERPC (KVM/powerpc): " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 8:08 ` Arnd Bergmann
2020-03-26 12:06 ` Michael Ellerman
2020-03-11 4:51 ` [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): " Joe Perches
` (13 subsequent siblings)
30 siblings, 2 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Jeremy Kerr
Cc: Arnd Bergmann, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, linuxppc-dev, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/powerpc/platforms/cell/spufs/switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index 5c3f5d0..d56b4e3 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -177,7 +177,7 @@ static inline void save_mfc_cntl(struct spu_state *csa, struct spu *spu)
POLL_WHILE_FALSE((in_be64(&priv2->mfc_control_RW) &
MFC_CNTL_SUSPEND_DMA_STATUS_MASK) ==
MFC_CNTL_SUSPEND_COMPLETE);
- /* fall through */
+ fallthrough;
case MFC_CNTL_SUSPEND_COMPLETE:
if (csa)
csa->priv2.mfc_control_RW =
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: " Joe Perches
@ 2020-03-11 8:08 ` Arnd Bergmann
2020-03-26 12:06 ` Michael Ellerman
1 sibling, 0 replies; 84+ messages in thread
From: Arnd Bergmann @ 2020-03-11 8:08 UTC (permalink / raw)
To: Joe Perches
Cc: Jeremy Kerr, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, linuxppc-dev, linux-kernel
On Wed, Mar 11, 2020 at 6:07 AM Joe Perches <joe@perches.com> wrote:
>
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: " Joe Perches
2020-03-11 8:08 ` Arnd Bergmann
@ 2020-03-26 12:06 ` Michael Ellerman
1 sibling, 0 replies; 84+ messages in thread
From: Michael Ellerman @ 2020-03-26 12:06 UTC (permalink / raw)
To: Joe Perches, Jeremy Kerr
Cc: Arnd Bergmann, linux-kernel, Paul Mackerras, linuxppc-dev
On Wed, 2020-03-11 at 04:51:31 UTC, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/addf3727ad28bd159ae2da433b48daf2ffb339f7
cheers
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (16 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 11:33 ` Christian Borntraeger
2020-03-13 12:04 ` Christian Borntraeger
2020-03-11 4:51 ` [PATCH -next 019/491] Hyper-V CORE AND DRIVERS: " Joe Perches
` (12 subsequent siblings)
30 siblings, 2 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Christian Borntraeger, Janosch Frank, David Hildenbrand, Cornelia Huck
Cc: Heiko Carstens, Vasily Gorbik, kvm, linux-s390, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/s390/kvm/gaccess.c | 23 +++++++++++++----------
arch/s390/kvm/interrupt.c | 2 +-
arch/s390/kvm/kvm-s390.c | 4 ++--
arch/s390/mm/gmap.c | 6 +++---
4 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/arch/s390/kvm/gaccess.c b/arch/s390/kvm/gaccess.c
index 07d30f..47a67a 100644
--- a/arch/s390/kvm/gaccess.c
+++ b/arch/s390/kvm/gaccess.c
@@ -505,7 +505,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
switch (prot) {
case PROT_TYPE_IEP:
tec->b61 = 1;
- /* FALL THROUGH */
+ fallthrough;
case PROT_TYPE_LA:
tec->b56 = 1;
break;
@@ -514,12 +514,12 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
break;
case PROT_TYPE_ALC:
tec->b60 = 1;
- /* FALL THROUGH */
+ fallthrough;
case PROT_TYPE_DAT:
tec->b61 = 1;
break;
}
- /* FALL THROUGH */
+ fallthrough;
case PGM_ASCE_TYPE:
case PGM_PAGE_TRANSLATION:
case PGM_REGION_FIRST_TRANS:
@@ -534,7 +534,7 @@ static int trans_exc(struct kvm_vcpu *vcpu, int code, unsigned long gva,
tec->addr = gva >> PAGE_SHIFT;
tec->fsi = mode == GACC_STORE ? FSI_STORE : FSI_FETCH;
tec->as = psw_bits(vcpu->arch.sie_block->gpsw).as;
- /* FALL THROUGH */
+ fallthrough;
case PGM_ALEN_TRANSLATION:
case PGM_ALE_SEQUENCE:
case PGM_ASTE_VALIDITY:
@@ -677,7 +677,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rfte.p;
ptr = rfte.rto * PAGE_SIZE + vaddr.rsx * 8;
}
- /* fallthrough */
+ fallthrough;
case ASCE_TYPE_REGION2: {
union region2_table_entry rste;
@@ -695,7 +695,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rste.p;
ptr = rste.rto * PAGE_SIZE + vaddr.rtx * 8;
}
- /* fallthrough */
+ fallthrough;
case ASCE_TYPE_REGION3: {
union region3_table_entry rtte;
@@ -723,7 +723,7 @@ static unsigned long guest_translate(struct kvm_vcpu *vcpu, unsigned long gva,
dat_protection |= rtte.fc0.p;
ptr = rtte.fc0.sto * PAGE_SIZE + vaddr.sx * 8;
}
- /* fallthrough */
+ fallthrough;
case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste;
@@ -1050,7 +1050,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_r2t(sg, saddr, rfte.val, *fake);
if (rc)
return rc;
- } /* fallthrough */
+ }
+ fallthrough;
case ASCE_TYPE_REGION2: {
union region2_table_entry rste;
@@ -1076,7 +1077,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_r3t(sg, saddr, rste.val, *fake);
if (rc)
return rc;
- } /* fallthrough */
+ }
+ fallthrough;
case ASCE_TYPE_REGION3: {
union region3_table_entry rtte;
@@ -1111,7 +1113,8 @@ static int kvm_s390_shadow_tables(struct gmap *sg, unsigned long saddr,
rc = gmap_shadow_sgt(sg, saddr, rtte.val, *fake);
if (rc)
return rc;
- } /* fallthrough */
+ }
+ fallthrough;
case ASCE_TYPE_SEGMENT: {
union segment_table_entry ste;
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index 028167d6..819110 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -886,7 +886,7 @@ static int __must_check __deliver_prog(struct kvm_vcpu *vcpu)
case PGM_PRIMARY_AUTHORITY:
case PGM_SECONDARY_AUTHORITY:
nullifying = true;
- /* fall through */
+ fallthrough;
case PGM_SPACE_SWITCH:
rc = put_guest_lc(vcpu, pgm_info.trans_exc_code,
(u64 *)__LC_TRANS_EXC_CODE);
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 6b1842a..d590f3 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -3752,7 +3752,7 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu,
rc = kvm_s390_pv_set_cpu_state(vcpu, PV_CPU_STATE_OPR_LOAD);
break;
case KVM_MP_STATE_CHECK_STOP:
- /* fall through - CHECK_STOP and LOAD are not supported yet */
+ fallthrough; /* CHECK_STOP and LOAD are not supported yet */
default:
rc = -ENXIO;
}
@@ -4985,7 +4985,7 @@ void kvm_arch_commit_memory_region(struct kvm *kvm,
old->npages * PAGE_SIZE);
if (rc)
break;
- /* FALLTHROUGH */
+ fallthrough;
case KVM_MR_CREATE:
rc = gmap_map_segment(kvm->arch.gmap, mem->userspace_addr,
mem->guest_phys_addr, mem->memory_size);
diff --git a/arch/s390/mm/gmap.c b/arch/s390/mm/gmap.c
index 27926a0..03c899 100644
--- a/arch/s390/mm/gmap.c
+++ b/arch/s390/mm/gmap.c
@@ -804,7 +804,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID)
return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
- /* Fallthrough */
+ fallthrough;
case _ASCE_TYPE_REGION2:
table += (gaddr & _REGION2_INDEX) >> _REGION2_SHIFT;
if (level == 3)
@@ -812,7 +812,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID)
return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
- /* Fallthrough */
+ fallthrough;
case _ASCE_TYPE_REGION3:
table += (gaddr & _REGION3_INDEX) >> _REGION3_SHIFT;
if (level == 2)
@@ -820,7 +820,7 @@ static inline unsigned long *gmap_table_walk(struct gmap *gmap,
if (*table & _REGION_ENTRY_INVALID)
return NULL;
table = (unsigned long *)(*table & _REGION_ENTRY_ORIGIN);
- /* Fallthrough */
+ fallthrough;
case _ASCE_TYPE_SEGMENT:
table += (gaddr & _SEGMENT_INDEX) >> _SEGMENT_SHIFT;
if (level == 1)
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): " Joe Perches
@ 2020-03-11 11:33 ` Christian Borntraeger
2020-03-13 12:04 ` Christian Borntraeger
1 sibling, 0 replies; 84+ messages in thread
From: Christian Borntraeger @ 2020-03-11 11:33 UTC (permalink / raw)
To: Joe Perches, Janosch Frank, David Hildenbrand, Cornelia Huck
Cc: Heiko Carstens, Vasily Gorbik, kvm, linux-s390, linux-kernel
On 11.03.20 05:51, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
That link does not work. lore asks if this is the right one
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
Shall I fix that up when applying?
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): " Joe Perches
2020-03-11 11:33 ` Christian Borntraeger
@ 2020-03-13 12:04 ` Christian Borntraeger
1 sibling, 0 replies; 84+ messages in thread
From: Christian Borntraeger @ 2020-03-13 12:04 UTC (permalink / raw)
To: Joe Perches, Janosch Frank, David Hildenbrand, Cornelia Huck
Cc: Heiko Carstens, Vasily Gorbik, kvm, linux-s390, linux-kernel
On 11.03.20 05:51, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
I have applied this with a fixed link.
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/s390/kvm/gaccess.c | 23 +++++++++++++----------
> arch/s390/kvm/interrupt.c | 2 +-
> arch/s390/kvm/kvm-s390.c | 4 ++--
> arch/s390/mm/gmap.c | 6 +++---
> 4 files changed, 19 insertions(+), 16 deletions(-)
[...]
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 019/491] Hyper-V CORE AND DRIVERS: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (17 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 018/491] KERNEL VIRTUAL MACHINE for s390 (KVM/s390): " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 11:00 ` Wei Liu
2020-03-11 4:51 ` [PATCH -next 020/491] XEN HYPERVISOR INTERFACE: " Joe Perches
` (11 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu
Cc: Bartlomiej Zolnierkiewicz, linux-hyperv, linux-kernel, dri-devel,
linux-fbdev
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/hv/hv_kvp.c | 4 +---
drivers/hv/vmbus_drv.c | 2 +-
drivers/video/fbdev/hyperv_fb.c | 4 ++--
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index e74b144..da4686 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -353,9 +353,7 @@ static void process_ib_ipinfo(void *in_msg, void *out_msg, int op)
MAX_IP_ADDR_SIZE);
out->body.kvp_ip_val.dhcp_enabled = in->kvp_ip_val.dhcp_enabled;
-
- /* fallthrough */
-
+ fallthrough;
case KVP_OP_GET_IP_INFO:
utf16s_to_utf8s((wchar_t *)in->kvp_ip_val.adapter_id,
MAX_ADAPTER_ID_SIZE,
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 029378..0befc0 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1188,7 +1188,7 @@ static void vmbus_chan_sched(struct hv_per_cpu_context *hv_cpu)
case HV_CALL_BATCHED:
hv_begin_read(&channel->inbound);
- /* fallthrough */
+ fallthrough;
case HV_CALL_DIRECT:
tasklet_schedule(&channel->callback_event);
}
diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c
index e4c3c8b..02411d 100644
--- a/drivers/video/fbdev/hyperv_fb.c
+++ b/drivers/video/fbdev/hyperv_fb.c
@@ -648,13 +648,13 @@ static int synthvid_connect_vsp(struct hv_device *hdev)
ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN10);
if (!ret)
break;
- /* Fallthrough */
+ fallthrough;
case VERSION_WIN8:
case VERSION_WIN8_1:
ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN8);
if (!ret)
break;
- /* Fallthrough */
+ fallthrough;
case VERSION_WS2008:
case VERSION_WIN7:
ret = synthvid_negotiate_ver(hdev, SYNTHVID_VERSION_WIN7);
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 019/491] Hyper-V CORE AND DRIVERS: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 019/491] Hyper-V CORE AND DRIVERS: " Joe Perches
@ 2020-03-11 11:00 ` Wei Liu
0 siblings, 0 replies; 84+ messages in thread
From: Wei Liu @ 2020-03-11 11:00 UTC (permalink / raw)
To: Joe Perches
Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
Bartlomiej Zolnierkiewicz, linux-hyperv, linux-kernel, dri-devel,
linux-fbdev
On Tue, Mar 10, 2020 at 09:51:33PM -0700, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 020/491] XEN HYPERVISOR INTERFACE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (18 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 019/491] Hyper-V CORE AND DRIVERS: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 6:47 ` Jürgen Groß
2020-03-11 4:51 ` [PATCH -next 021/491] KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86): " Joe Perches
` (10 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Boris Ostrovsky, Juergen Gross, Stefano Stabellini,
Konrad Rzeszutek Wilk, Roger Pau Monné,
Jens Axboe, David S. Miller, Bjorn Helgaas, James E.J. Bottomley,
Martin K. Petersen
Cc: xen-devel, linux-block, linux-kernel, netdev, linux-pci, linux-scsi
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/block/xen-blkfront.c | 5 ++---
drivers/net/xen-netfront.c | 2 +-
drivers/pci/xen-pcifront.c | 2 +-
drivers/scsi/xen-scsifront.c | 2 +-
drivers/xen/pvcalls-front.c | 2 +-
drivers/xen/xen-acpi-memhotplug.c | 2 +-
drivers/xen/xen-pciback/xenbus.c | 2 +-
drivers/xen/xen-scsiback.c | 2 +-
drivers/xen/xenbus/xenbus_probe_frontend.c | 6 ++----
9 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 9df516..fb07ee1 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1402,7 +1402,6 @@ static enum blk_req_status blkif_rsp_to_req_status(int rsp)
case BLKIF_RSP_EOPNOTSUPP:
return REQ_EOPNOTSUPP;
case BLKIF_RSP_ERROR:
- /* Fallthrough. */
default:
return REQ_ERROR;
}
@@ -1642,7 +1641,7 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
info->feature_flush = 0;
xlvbd_flush(info);
}
- /* fall through */
+ fallthrough;
case BLKIF_OP_READ:
case BLKIF_OP_WRITE:
if (unlikely(bret->status != BLKIF_RSP_OKAY))
@@ -2480,7 +2479,7 @@ static void blkback_changed(struct xenbus_device *dev,
case XenbusStateClosed:
if (dev->state == XenbusStateClosed)
break;
- /* fall through */
+ fallthrough;
case XenbusStateClosing:
if (info)
blkfront_closing(info);
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 482c6c..2001606 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -2038,7 +2038,7 @@ static void netback_changed(struct xenbus_device *dev,
case XenbusStateClosed:
if (dev->state == XenbusStateClosed)
break;
- /* Fall through - Missed the backend's CLOSING state. */
+ fallthrough; /* Missed the backend's CLOSING state */
case XenbusStateClosing:
xenbus_frontend_closed(dev);
break;
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index d1b16c..093ab8 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -1103,7 +1103,7 @@ static void __ref pcifront_backend_changed(struct xenbus_device *xdev,
case XenbusStateClosed:
if (xdev->state == XenbusStateClosed)
break;
- /* fall through - Missed the backend's CLOSING state. */
+ fallthrough; /* Missed the backend's CLOSING state */
case XenbusStateClosing:
dev_warn(&xdev->dev, "backend going away!\n");
pcifront_try_disconnect(pdev);
diff --git a/drivers/scsi/xen-scsifront.c b/drivers/scsi/xen-scsifront.c
index f0068e..259fc248 100644
--- a/drivers/scsi/xen-scsifront.c
+++ b/drivers/scsi/xen-scsifront.c
@@ -1111,7 +1111,7 @@ static void scsifront_backend_changed(struct xenbus_device *dev,
case XenbusStateClosed:
if (dev->state == XenbusStateClosed)
break;
- /* fall through - Missed the backend's Closing state */
+ fallthrough; /* Missed the backend's Closing state */
case XenbusStateClosing:
scsifront_disconnect(info);
break;
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 57592a6..0fccf0 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -1260,7 +1260,7 @@ static void pvcalls_front_changed(struct xenbus_device *dev,
if (dev->state == XenbusStateClosed)
break;
/* Missed the backend's CLOSING state */
- /* fall through */
+ fallthrough;
case XenbusStateClosing:
xenbus_frontend_closed(dev);
break;
diff --git a/drivers/xen/xen-acpi-memhotplug.c b/drivers/xen/xen-acpi-memhotplug.c
index 745721..f914b72 100644
--- a/drivers/xen/xen-acpi-memhotplug.c
+++ b/drivers/xen/xen-acpi-memhotplug.c
@@ -229,7 +229,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
case ACPI_NOTIFY_BUS_CHECK:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"\nReceived BUS CHECK notification for device\n"));
- /* Fall Through */
+ fallthrough;
case ACPI_NOTIFY_DEVICE_CHECK:
if (event == ACPI_NOTIFY_DEVICE_CHECK)
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
diff --git a/drivers/xen/xen-pciback/xenbus.c b/drivers/xen/xen-pciback/xenbus.c
index 833b2d..a108740 100644
--- a/drivers/xen/xen-pciback/xenbus.c
+++ b/drivers/xen/xen-pciback/xenbus.c
@@ -544,7 +544,7 @@ static void xen_pcibk_frontend_changed(struct xenbus_device *xdev,
xenbus_switch_state(xdev, XenbusStateClosed);
if (xenbus_dev_is_online(xdev))
break;
- /* fall through - if not online */
+ fallthrough; /* if not online */
case XenbusStateUnknown:
dev_dbg(&xdev->dev, "frontend is gone! unregister device\n");
device_unregister(&xdev->dev);
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
index ba0942e..9daef2 100644
--- a/drivers/xen/xen-scsiback.c
+++ b/drivers/xen/xen-scsiback.c
@@ -1184,7 +1184,7 @@ static void scsiback_frontend_changed(struct xenbus_device *dev,
xenbus_switch_state(dev, XenbusStateClosed);
if (xenbus_dev_is_online(dev))
break;
- /* fall through - if not online */
+ fallthrough; /* if not online */
case XenbusStateUnknown:
device_unregister(&dev->dev);
break;
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c
index 8a1650..708917 100644
--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -402,13 +402,11 @@ static void xenbus_reset_frontend(char *fe, char *be, int be_state)
case XenbusStateConnected:
xenbus_printf(XBT_NIL, fe, "state", "%d", XenbusStateClosing);
xenbus_reset_wait_for_backend(be, XenbusStateClosing);
- /* fall through */
-
+ fallthrough;
case XenbusStateClosing:
xenbus_printf(XBT_NIL, fe, "state", "%d", XenbusStateClosed);
xenbus_reset_wait_for_backend(be, XenbusStateClosed);
- /* fall through */
-
+ fallthrough;
case XenbusStateClosed:
xenbus_printf(XBT_NIL, fe, "state", "%d", XenbusStateInitialising);
xenbus_reset_wait_for_backend(be, XenbusStateInitWait);
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 020/491] XEN HYPERVISOR INTERFACE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 020/491] XEN HYPERVISOR INTERFACE: " Joe Perches
@ 2020-03-11 6:47 ` Jürgen Groß
0 siblings, 0 replies; 84+ messages in thread
From: Jürgen Groß @ 2020-03-11 6:47 UTC (permalink / raw)
To: Joe Perches, Boris Ostrovsky, Stefano Stabellini,
Konrad Rzeszutek Wilk, Roger Pau Monné,
Jens Axboe, David S. Miller, Bjorn Helgaas, James E.J. Bottomley,
Martin K. Petersen
Cc: xen-devel, linux-block, linux-kernel, netdev, linux-pci, linux-scsi
On 11.03.20 05:51, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 021/491] KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86): Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (19 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 020/491] XEN HYPERVISOR INTERFACE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 9:43 ` Paolo Bonzini
2020-03-11 4:51 ` [PATCH -next 022/491] X86 MCE INFRASTRUCTURE: " Joe Perches
` (9 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Paolo Bonzini, Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li,
Jim Mattson, Joerg Roedel
Cc: Thomas Gleixner, Borislav Petkov, H. Peter Anvin, x86, kvm, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/x86/kvm/emulate.c | 2 +-
arch/x86/kvm/hyperv.c | 2 +-
arch/x86/kvm/irq_comm.c | 2 +-
arch/x86/kvm/lapic.c | 6 +++---
arch/x86/kvm/mmu/mmu.c | 2 +-
arch/x86/kvm/svm.c | 2 +-
arch/x86/kvm/vmx/vmx.c | 15 +++++++--------
arch/x86/kvm/x86.c | 12 ++++--------
8 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index bc00642..bae4d8 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3025,7 +3025,7 @@ static void string_registers_quirk(struct x86_emulate_ctxt *ctxt)
case 0xa4: /* movsb */
case 0xa5: /* movsd/w */
*reg_rmw(ctxt, VCPU_REGS_RSI) &= (u32)-1;
- /* fall through */
+ fallthrough;
case 0xaa: /* stosb */
case 0xab: /* stosd/w */
*reg_rmw(ctxt, VCPU_REGS_RDI) &= (u32)-1;
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index a86fda7..934bfb4 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1652,7 +1652,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
ret = kvm_hvcall_signal_event(vcpu, fast, ingpa);
if (ret != HV_STATUS_INVALID_PORT_ID)
break;
- /* fall through - maybe userspace knows this conn_id. */
+ fallthrough; /* maybe userspace knows this conn_id */
case HVCALL_POST_MESSAGE:
/* don't bother userspace if it has no way to handle it */
if (unlikely(rep || !vcpu_to_synic(vcpu)->active)) {
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
index c47d2a..4aa1c2e 100644
--- a/arch/x86/kvm/irq_comm.c
+++ b/arch/x86/kvm/irq_comm.c
@@ -285,7 +285,7 @@ int kvm_set_routing_entry(struct kvm *kvm,
switch (ue->u.irqchip.irqchip) {
case KVM_IRQCHIP_PIC_SLAVE:
e->irqchip.pin += PIC_NUM_PINS / 2;
- /* fall through */
+ fallthrough;
case KVM_IRQCHIP_PIC_MASTER:
if (ue->u.irqchip.pin >= PIC_NUM_PINS / 2)
return -EINVAL;
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index e3099c..64b7a9c 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1023,7 +1023,7 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
switch (delivery_mode) {
case APIC_DM_LOWEST:
vcpu->arch.apic_arb_prio++;
- /* fall through */
+ fallthrough;
case APIC_DM_FIXED:
if (unlikely(trig_mode && !level))
break;
@@ -1311,7 +1311,7 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
break;
case APIC_TASKPRI:
report_tpr_access(apic, false);
- /* fall thru */
+ fallthrough;
default:
val = kvm_lapic_get_reg(apic, offset);
break;
@@ -1952,7 +1952,7 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
case APIC_LVT0:
apic_manage_nmi_watchdog(apic, val);
- /* fall through */
+ fallthrough;
case APIC_LVTTHMR:
case APIC_LVTPC:
case APIC_LVT1:
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 87e9ba..8593cd 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -4475,7 +4475,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
rsvd_bits(maxphyaddr, 51);
rsvd_check->rsvd_bits_mask[1][4] =
rsvd_check->rsvd_bits_mask[0][4];
- /* fall through */
+ fallthrough;
case PT64_ROOT_4LEVEL:
rsvd_check->rsvd_bits_mask[0][3] = exb_bit_rsvd |
nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 910005..73fa903 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4449,7 +4449,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
case MSR_IA32_APICBASE:
if (kvm_vcpu_apicv_active(vcpu))
avic_update_vapic_bar(to_svm(vcpu), data);
- /* Fall through */
+ fallthrough;
default:
return kvm_set_msr_common(vcpu, msr);
}
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 69c5bd..1577cd 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -4538,12 +4538,12 @@ static bool rmode_exception(struct kvm_vcpu *vcpu, int vec)
vmcs_read32(VM_EXIT_INSTRUCTION_LEN);
if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP)
return false;
- /* fall through */
+ fallthrough;
case DB_VECTOR:
if (vcpu->guest_debug &
(KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))
return false;
- /* fall through */
+ fallthrough;
case DE_VECTOR:
case OF_VECTOR:
case BR_VECTOR:
@@ -4692,7 +4692,7 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
}
kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1;
kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7);
- /* fall through */
+ fallthrough;
case BP_VECTOR:
/*
* Update instruction length as we may reinject #BP from
@@ -5119,7 +5119,7 @@ static int handle_task_switch(struct kvm_vcpu *vcpu)
error_code =
vmcs_read32(IDT_VECTORING_ERROR_CODE);
}
- /* fall through */
+ fallthrough;
case INTR_TYPE_SOFT_EXCEPTION:
kvm_clear_exception_queue(vcpu);
break;
@@ -5469,8 +5469,7 @@ static int handle_invpcid(struct kvm_vcpu *vcpu)
* global flush. If needed, we could optimize this later by
* keeping track of global entries in shadow page tables.
*/
-
- /* fall-through */
+ fallthrough;
case INVPCID_TYPE_ALL_INCL_GLOBAL:
kvm_mmu_unload(vcpu);
return kvm_skip_emulated_instruction(vcpu);
@@ -6401,7 +6400,7 @@ static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu,
break;
case INTR_TYPE_SOFT_EXCEPTION:
vcpu->arch.event_exit_inst_len = vmcs_read32(instr_len_field);
- /* fall through */
+ fallthrough;
case INTR_TYPE_HARD_EXCEPTION:
if (idt_vectoring_info & VECTORING_INFO_DELIVER_CODE_MASK) {
u32 err = vmcs_read32(error_code_field);
@@ -6411,7 +6410,7 @@ static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu,
break;
case INTR_TYPE_SOFT_INTR:
vcpu->arch.event_exit_inst_len = vmcs_read32(instr_len_field);
- /* fall through */
+ fallthrough;
case INTR_TYPE_EXT_INTR:
kvm_queue_interrupt(vcpu, vector, type == INTR_TYPE_SOFT_INTR);
break;
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 2bbc0e0..e6280e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1071,7 +1071,6 @@ static int __kvm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long val)
vcpu->arch.eff_db[dr] = val;
break;
case 4:
- /* fall through */
case 6:
if (val & 0xffffffff00000000ULL)
return -1; /* #GP */
@@ -1079,7 +1078,6 @@ static int __kvm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long val)
kvm_update_dr6(vcpu);
break;
case 5:
- /* fall through */
default: /* 7 */
if (!kvm_dr7_valid(val))
return -1; /* #GP */
@@ -1110,7 +1108,6 @@ int kvm_get_dr(struct kvm_vcpu *vcpu, int dr, unsigned long *val)
*val = vcpu->arch.db[array_index_nospec(dr, size)];
break;
case 4:
- /* fall through */
case 6:
if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP)
*val = vcpu->arch.dr6;
@@ -1118,7 +1115,6 @@ int kvm_get_dr(struct kvm_vcpu *vcpu, int dr, unsigned long *val)
*val = kvm_x86_ops->get_dr6(vcpu);
break;
case 5:
- /* fall through */
default: /* 7 */
*val = vcpu->arch.dr7;
break;
@@ -2885,7 +2881,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
case MSR_K7_PERFCTR0 ... MSR_K7_PERFCTR3:
case MSR_P6_PERFCTR0 ... MSR_P6_PERFCTR1:
- pr = true; /* fall through */
+ pr = true;
+ fallthrough;
case MSR_K7_EVNTSEL0 ... MSR_K7_EVNTSEL3:
case MSR_P6_EVNTSEL0 ... MSR_P6_EVNTSEL1:
if (kvm_pmu_is_valid_msr(vcpu, msr))
@@ -4181,8 +4178,7 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
case KVM_CAP_HYPERV_SYNIC2:
if (cap->args[0])
return -EINVAL;
- /* fall through */
-
+ fallthrough;
case KVM_CAP_HYPERV_SYNIC:
if (!irqchip_in_kernel(vcpu->kvm))
return -EINVAL;
@@ -8478,7 +8474,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu)
vcpu->arch.pv.pv_unhalted = false;
vcpu->arch.mp_state =
KVM_MP_STATE_RUNNABLE;
- /* fall through */
+ fallthrough;
case KVM_MP_STATE_RUNNABLE:
vcpu->arch.apf.halted = false;
break;
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 021/491] KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86): Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 021/491] KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86): " Joe Perches
@ 2020-03-11 9:43 ` Paolo Bonzini
0 siblings, 0 replies; 84+ messages in thread
From: Paolo Bonzini @ 2020-03-11 9:43 UTC (permalink / raw)
To: Joe Perches, Sean Christopherson, Vitaly Kuznetsov, Wanpeng Li,
Jim Mattson, Joerg Roedel
Cc: Thomas Gleixner, Borislav Petkov, H. Peter Anvin, x86, kvm, linux-kernel
On 11/03/20 05:51, Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/x86/kvm/emulate.c | 2 +-
> arch/x86/kvm/hyperv.c | 2 +-
> arch/x86/kvm/irq_comm.c | 2 +-
> arch/x86/kvm/lapic.c | 6 +++---
> arch/x86/kvm/mmu/mmu.c | 2 +-
> arch/x86/kvm/svm.c | 2 +-
> arch/x86/kvm/vmx/vmx.c | 15 +++++++--------
> arch/x86/kvm/x86.c | 12 ++++--------
> 8 files changed, 19 insertions(+), 24 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index bc00642..bae4d8 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3025,7 +3025,7 @@ static void string_registers_quirk(struct x86_emulate_ctxt *ctxt)
> case 0xa4: /* movsb */
> case 0xa5: /* movsd/w */
> *reg_rmw(ctxt, VCPU_REGS_RSI) &= (u32)-1;
> - /* fall through */
> + fallthrough;
> case 0xaa: /* stosb */
> case 0xab: /* stosd/w */
> *reg_rmw(ctxt, VCPU_REGS_RDI) &= (u32)-1;
> diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
> index a86fda7..934bfb4 100644
> --- a/arch/x86/kvm/hyperv.c
> +++ b/arch/x86/kvm/hyperv.c
> @@ -1652,7 +1652,7 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu)
> ret = kvm_hvcall_signal_event(vcpu, fast, ingpa);
> if (ret != HV_STATUS_INVALID_PORT_ID)
> break;
> - /* fall through - maybe userspace knows this conn_id. */
> + fallthrough; /* maybe userspace knows this conn_id */
> case HVCALL_POST_MESSAGE:
> /* don't bother userspace if it has no way to handle it */
> if (unlikely(rep || !vcpu_to_synic(vcpu)->active)) {
> diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
> index c47d2a..4aa1c2e 100644
> --- a/arch/x86/kvm/irq_comm.c
> +++ b/arch/x86/kvm/irq_comm.c
> @@ -285,7 +285,7 @@ int kvm_set_routing_entry(struct kvm *kvm,
> switch (ue->u.irqchip.irqchip) {
> case KVM_IRQCHIP_PIC_SLAVE:
> e->irqchip.pin += PIC_NUM_PINS / 2;
> - /* fall through */
> + fallthrough;
> case KVM_IRQCHIP_PIC_MASTER:
> if (ue->u.irqchip.pin >= PIC_NUM_PINS / 2)
> return -EINVAL;
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index e3099c..64b7a9c 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -1023,7 +1023,7 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
> switch (delivery_mode) {
> case APIC_DM_LOWEST:
> vcpu->arch.apic_arb_prio++;
> - /* fall through */
> + fallthrough;
> case APIC_DM_FIXED:
> if (unlikely(trig_mode && !level))
> break;
> @@ -1311,7 +1311,7 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
> break;
> case APIC_TASKPRI:
> report_tpr_access(apic, false);
> - /* fall thru */
> + fallthrough;
> default:
> val = kvm_lapic_get_reg(apic, offset);
> break;
> @@ -1952,7 +1952,7 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
>
> case APIC_LVT0:
> apic_manage_nmi_watchdog(apic, val);
> - /* fall through */
> + fallthrough;
> case APIC_LVTTHMR:
> case APIC_LVTPC:
> case APIC_LVT1:
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 87e9ba..8593cd 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -4475,7 +4475,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
> rsvd_bits(maxphyaddr, 51);
> rsvd_check->rsvd_bits_mask[1][4] =
> rsvd_check->rsvd_bits_mask[0][4];
> - /* fall through */
> + fallthrough;
> case PT64_ROOT_4LEVEL:
> rsvd_check->rsvd_bits_mask[0][3] = exb_bit_rsvd |
> nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
> diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
> index 910005..73fa903 100644
> --- a/arch/x86/kvm/svm.c
> +++ b/arch/x86/kvm/svm.c
> @@ -4449,7 +4449,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)
> case MSR_IA32_APICBASE:
> if (kvm_vcpu_apicv_active(vcpu))
> avic_update_vapic_bar(to_svm(vcpu), data);
> - /* Fall through */
> + fallthrough;
> default:
> return kvm_set_msr_common(vcpu, msr);
> }
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index 69c5bd..1577cd 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -4538,12 +4538,12 @@ static bool rmode_exception(struct kvm_vcpu *vcpu, int vec)
> vmcs_read32(VM_EXIT_INSTRUCTION_LEN);
> if (vcpu->guest_debug & KVM_GUESTDBG_USE_SW_BP)
> return false;
> - /* fall through */
> + fallthrough;
> case DB_VECTOR:
> if (vcpu->guest_debug &
> (KVM_GUESTDBG_SINGLESTEP | KVM_GUESTDBG_USE_HW_BP))
> return false;
> - /* fall through */
> + fallthrough;
> case DE_VECTOR:
> case OF_VECTOR:
> case BR_VECTOR:
> @@ -4692,7 +4692,7 @@ static int handle_exception_nmi(struct kvm_vcpu *vcpu)
> }
> kvm_run->debug.arch.dr6 = dr6 | DR6_FIXED_1;
> kvm_run->debug.arch.dr7 = vmcs_readl(GUEST_DR7);
> - /* fall through */
> + fallthrough;
> case BP_VECTOR:
> /*
> * Update instruction length as we may reinject #BP from
> @@ -5119,7 +5119,7 @@ static int handle_task_switch(struct kvm_vcpu *vcpu)
> error_code =
> vmcs_read32(IDT_VECTORING_ERROR_CODE);
> }
> - /* fall through */
> + fallthrough;
> case INTR_TYPE_SOFT_EXCEPTION:
> kvm_clear_exception_queue(vcpu);
> break;
> @@ -5469,8 +5469,7 @@ static int handle_invpcid(struct kvm_vcpu *vcpu)
> * global flush. If needed, we could optimize this later by
> * keeping track of global entries in shadow page tables.
> */
> -
> - /* fall-through */
> + fallthrough;
> case INVPCID_TYPE_ALL_INCL_GLOBAL:
> kvm_mmu_unload(vcpu);
> return kvm_skip_emulated_instruction(vcpu);
> @@ -6401,7 +6400,7 @@ static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu,
> break;
> case INTR_TYPE_SOFT_EXCEPTION:
> vcpu->arch.event_exit_inst_len = vmcs_read32(instr_len_field);
> - /* fall through */
> + fallthrough;
> case INTR_TYPE_HARD_EXCEPTION:
> if (idt_vectoring_info & VECTORING_INFO_DELIVER_CODE_MASK) {
> u32 err = vmcs_read32(error_code_field);
> @@ -6411,7 +6410,7 @@ static void __vmx_complete_interrupts(struct kvm_vcpu *vcpu,
> break;
> case INTR_TYPE_SOFT_INTR:
> vcpu->arch.event_exit_inst_len = vmcs_read32(instr_len_field);
> - /* fall through */
> + fallthrough;
> case INTR_TYPE_EXT_INTR:
> kvm_queue_interrupt(vcpu, vector, type == INTR_TYPE_SOFT_INTR);
> break;
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 2bbc0e0..e6280e 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1071,7 +1071,6 @@ static int __kvm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long val)
> vcpu->arch.eff_db[dr] = val;
> break;
> case 4:
> - /* fall through */
> case 6:
> if (val & 0xffffffff00000000ULL)
> return -1; /* #GP */
> @@ -1079,7 +1078,6 @@ static int __kvm_set_dr(struct kvm_vcpu *vcpu, int dr, unsigned long val)
> kvm_update_dr6(vcpu);
> break;
> case 5:
> - /* fall through */
> default: /* 7 */
> if (!kvm_dr7_valid(val))
> return -1; /* #GP */
> @@ -1110,7 +1108,6 @@ int kvm_get_dr(struct kvm_vcpu *vcpu, int dr, unsigned long *val)
> *val = vcpu->arch.db[array_index_nospec(dr, size)];
> break;
> case 4:
> - /* fall through */
> case 6:
> if (vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP)
> *val = vcpu->arch.dr6;
> @@ -1118,7 +1115,6 @@ int kvm_get_dr(struct kvm_vcpu *vcpu, int dr, unsigned long *val)
> *val = kvm_x86_ops->get_dr6(vcpu);
> break;
> case 5:
> - /* fall through */
> default: /* 7 */
> *val = vcpu->arch.dr7;
> break;
> @@ -2885,7 +2881,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
>
> case MSR_K7_PERFCTR0 ... MSR_K7_PERFCTR3:
> case MSR_P6_PERFCTR0 ... MSR_P6_PERFCTR1:
> - pr = true; /* fall through */
> + pr = true;
> + fallthrough;
> case MSR_K7_EVNTSEL0 ... MSR_K7_EVNTSEL3:
> case MSR_P6_EVNTSEL0 ... MSR_P6_EVNTSEL1:
> if (kvm_pmu_is_valid_msr(vcpu, msr))
> @@ -4181,8 +4178,7 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
> case KVM_CAP_HYPERV_SYNIC2:
> if (cap->args[0])
> return -EINVAL;
> - /* fall through */
> -
> + fallthrough;
> case KVM_CAP_HYPERV_SYNIC:
> if (!irqchip_in_kernel(vcpu->kvm))
> return -EINVAL;
> @@ -8478,7 +8474,7 @@ static inline int vcpu_block(struct kvm *kvm, struct kvm_vcpu *vcpu)
> vcpu->arch.pv.pv_unhalted = false;
> vcpu->arch.mp_state =
> KVM_MP_STATE_RUNNABLE;
> - /* fall through */
> + fallthrough;
> case KVM_MP_STATE_RUNNABLE:
> vcpu->arch.apf.halted = false;
> break;
>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 022/491] X86 MCE INFRASTRUCTURE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (20 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 021/491] KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86): " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 17:14 ` Borislav Petkov
2020-03-11 4:51 ` [PATCH -next 023/491] AMD KFD: " Joe Perches
` (8 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Tony Luck, Borislav Petkov
Cc: Thomas Gleixner, H. Peter Anvin, x86, linux-edac, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
arch/x86/kernel/cpu/mce/inject.c | 2 +-
arch/x86/kernel/cpu/mce/intel.c | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c
index 3413b41..b5e3bab 100644
--- a/arch/x86/kernel/cpu/mce/inject.c
+++ b/arch/x86/kernel/cpu/mce/inject.c
@@ -199,7 +199,7 @@ static int raise_local(void)
* calling irq_enter, but the necessary
* machinery isn't exported currently.
*/
- /*FALL THROUGH*/
+ fallthrough;
case MCJ_CTX_PROCESS:
raise_exception(m, NULL);
break;
diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
index d8f9230..5be647 100644
--- a/arch/x86/kernel/cpu/mce/intel.c
+++ b/arch/x86/kernel/cpu/mce/intel.c
@@ -192,9 +192,7 @@ unsigned long cmci_intel_adjust_timer(unsigned long interval)
__this_cpu_write(cmci_storm_state, CMCI_STORM_SUBSIDED);
if (!atomic_sub_return(1, &cmci_storm_on_cpus))
pr_notice("CMCI storm subsided: switching to interrupt mode\n");
-
- /* FALLTHROUGH */
-
+ fallthrough;
case CMCI_STORM_SUBSIDED:
/*
* We wait for all CPUs to go back to SUBSIDED state. When that
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* Re: [PATCH -next 022/491] X86 MCE INFRASTRUCTURE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 022/491] X86 MCE INFRASTRUCTURE: " Joe Perches
@ 2020-03-11 17:14 ` Borislav Petkov
0 siblings, 0 replies; 84+ messages in thread
From: Borislav Petkov @ 2020-03-11 17:14 UTC (permalink / raw)
To: Joe Perches
Cc: Tony Luck, Thomas Gleixner, H. Peter Anvin, x86, linux-edac,
linux-kernel
On Tue, Mar 10, 2020 at 09:51:36PM -0700, Joe Perches wrote:
> Subject: Re: [PATCH -next 022/491] X86 MCE INFRASTRUCTURE: Use fallthrough;
Make that subject prefix "x86/mce: ..."
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/x86/kernel/cpu/mce/inject.c | 2 +-
> arch/x86/kernel/cpu/mce/intel.c | 4 +---
> 2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c
> index 3413b41..b5e3bab 100644
> --- a/arch/x86/kernel/cpu/mce/inject.c
> +++ b/arch/x86/kernel/cpu/mce/inject.c
> @@ -199,7 +199,7 @@ static int raise_local(void)
> * calling irq_enter, but the necessary
> * machinery isn't exported currently.
> */
> - /*FALL THROUGH*/
> + fallthrough;
> case MCJ_CTX_PROCESS:
> raise_exception(m, NULL);
> break;
> diff --git a/arch/x86/kernel/cpu/mce/intel.c b/arch/x86/kernel/cpu/mce/intel.c
> index d8f9230..5be647 100644
> --- a/arch/x86/kernel/cpu/mce/intel.c
> +++ b/arch/x86/kernel/cpu/mce/intel.c
> @@ -192,9 +192,7 @@ unsigned long cmci_intel_adjust_timer(unsigned long interval)
> __this_cpu_write(cmci_storm_state, CMCI_STORM_SUBSIDED);
> if (!atomic_sub_return(1, &cmci_storm_on_cpus))
> pr_notice("CMCI storm subsided: switching to interrupt mode\n");
> -
> - /* FALLTHROUGH */
> -
> + fallthrough;
> case CMCI_STORM_SUBSIDED:
> /*
> * We wait for all CPUs to go back to SUBSIDED state. When that
> --
With that:
Acked-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 023/491] AMD KFD: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (21 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 022/491] X86 MCE INFRASTRUCTURE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 21:50 ` Felix Kuehling
2020-03-11 4:51 ` [PATCH -next 024/491] AMD DISPLAY CORE: " Joe Perches
` (7 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Felix Kuehling
Cc: Alex Deucher, Christian König, David (ChunMing) Zhou,
David Airlie, Daniel Vetter, amd-gfx, dri-devel, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
index d6549e..6529ca 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
@@ -79,7 +79,7 @@ static uint32_t get_sdma_rlc_reg_offset(struct amdgpu_device *adev,
dev_warn(adev->dev,
"Invalid sdma engine id (%d), using engine id 0\n",
engine_id);
- /* fall through */
+ fallthrough;
case 0:
sdma_engine_reg_base = SOC15_REG_OFFSET(SDMA0, 0,
mmSDMA0_RLC0_RB_CNTL) - mmSDMA0_RLC0_RB_CNTL;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 023/491] AMD KFD: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 023/491] AMD KFD: " Joe Perches
@ 2020-03-11 21:50 ` Felix Kuehling
2020-03-11 22:09 ` Joe Perches
0 siblings, 1 reply; 84+ messages in thread
From: Felix Kuehling @ 2020-03-11 21:50 UTC (permalink / raw)
To: Joe Perches
Cc: Alex Deucher, Christian König, David (ChunMing) Zhou,
David Airlie, Daniel Vetter, amd-gfx, dri-devel, linux-kernel
On 2020-03-11 12:51 a.m., Joe Perches wrote:
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
The link seems to be broken. This one works:
https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
> index d6549e..6529ca 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
> @@ -79,7 +79,7 @@ static uint32_t get_sdma_rlc_reg_offset(struct amdgpu_device *adev,
> dev_warn(adev->dev,
> "Invalid sdma engine id (%d), using engine id 0\n",
> engine_id);
> - /* fall through */
> + fallthrough;
> case 0:
> sdma_engine_reg_base = SOC15_REG_OFFSET(SDMA0, 0,
> mmSDMA0_RLC0_RB_CNTL) - mmSDMA0_RLC0_RB_CNTL;
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 023/491] AMD KFD: Use fallthrough;
2020-03-11 21:50 ` Felix Kuehling
@ 2020-03-11 22:09 ` Joe Perches
2020-03-12 14:12 ` Alex Deucher
0 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 22:09 UTC (permalink / raw)
To: Felix Kuehling
Cc: Alex Deucher, Christian König, David (ChunMing) Zhou,
David Airlie, Daniel Vetter, amd-gfx, dri-devel, linux-kernel
On Wed, 2020-03-11 at 17:50 -0400, Felix Kuehling wrote:
> On 2020-03-11 12:51 a.m., Joe Perches wrote:
> > Convert the various uses of fallthrough comments to fallthrough;
> >
> > Done via script
> > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> The link seems to be broken. This one works:
> https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
Thanks.
I neglected to use a backslash on the generating script.
In the script in 0/491,
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
likely should have been:
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe\@perches.com/
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 023/491] AMD KFD: Use fallthrough;
2020-03-11 22:09 ` Joe Perches
@ 2020-03-12 14:12 ` Alex Deucher
0 siblings, 0 replies; 84+ messages in thread
From: Alex Deucher @ 2020-03-12 14:12 UTC (permalink / raw)
To: Joe Perches
Cc: Felix Kuehling, David Airlie, LKML, amd-gfx list,
Maling list - DRI developers, Alex Deucher, Christian König
Applied. Thanks. Link fixed locally.
Alex
On Wed, Mar 11, 2020 at 6:11 PM Joe Perches <joe@perches.com> wrote:
>
> On Wed, 2020-03-11 at 17:50 -0400, Felix Kuehling wrote:
> > On 2020-03-11 12:51 a.m., Joe Perches wrote:
> > > Convert the various uses of fallthrough comments to fallthrough;
> > >
> > > Done via script
> > > Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
> >
> > The link seems to be broken. This one works:
> > https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
>
> Thanks.
>
> I neglected to use a backslash on the generating script.
> In the script in 0/491,
>
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe@perches.com/
>
> likely should have been:
>
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe\@perches.com/
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 024/491] AMD DISPLAY CORE: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (22 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 023/491] AMD KFD: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-12 14:10 ` Alex Deucher
2020-03-11 4:51 ` [PATCH -next 025/491] AMD POWERPLAY: " Joe Perches
` (6 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: linux-kernel
Cc: Harry Wentland, Leo Li, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, amd-gfx,
dri-devel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++--
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +-
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 2f1c958..37fa7b 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -267,7 +267,7 @@ static struct atom_display_object_path_v2 *get_bios_object(
&& id.enum_id == obj_id.enum_id)
return &bp->object_info_tbl.v1_4->display_path[i];
}
- /* fall through */
+ fallthrough;
case OBJECT_TYPE_CONNECTOR:
case OBJECT_TYPE_GENERIC:
/* Both Generic and Connector Object ID
@@ -280,7 +280,7 @@ static struct atom_display_object_path_v2 *get_bios_object(
&& id.enum_id == obj_id.enum_id)
return &bp->object_info_tbl.v1_4->display_path[i];
}
- /* fall through */
+ fallthrough;
default:
return NULL;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
index 68c4049..743042 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
@@ -645,7 +645,7 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
case AUX_TRANSACTION_REPLY_AUX_DEFER:
case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
retry_on_defer = true;
- /* fall through */
+ fallthrough;
case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK:
if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES) {
goto fail;
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
index 8aa937f..51481e 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
@@ -479,7 +479,7 @@ static void program_grph_pixel_format(
case SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F:
sign = 1;
floating = 1;
- /* fall through */
+ fallthrough;
case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F: /* shouldn't this get float too? */
case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616:
grph_depth = 3;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 024/491] AMD DISPLAY CORE: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 024/491] AMD DISPLAY CORE: " Joe Perches
@ 2020-03-12 14:10 ` Alex Deucher
0 siblings, 0 replies; 84+ messages in thread
From: Alex Deucher @ 2020-03-12 14:10 UTC (permalink / raw)
To: Joe Perches
Cc: LKML, Leo Li, amd-gfx list, David Airlie,
Maling list - DRI developers, Alex Deucher, Christian König
Applied. thanks! (link fixed locally).
Alex
On Wed, Mar 11, 2020 at 1:07 AM Joe Perches <joe@perches.com> wrote:
>
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++--
> drivers/gpu/drm/amd/display/dc/dce/dce_aux.c | 2 +-
> drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c | 2 +-
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> index 2f1c958..37fa7b 100644
> --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> @@ -267,7 +267,7 @@ static struct atom_display_object_path_v2 *get_bios_object(
> && id.enum_id == obj_id.enum_id)
> return &bp->object_info_tbl.v1_4->display_path[i];
> }
> - /* fall through */
> + fallthrough;
> case OBJECT_TYPE_CONNECTOR:
> case OBJECT_TYPE_GENERIC:
> /* Both Generic and Connector Object ID
> @@ -280,7 +280,7 @@ static struct atom_display_object_path_v2 *get_bios_object(
> && id.enum_id == obj_id.enum_id)
> return &bp->object_info_tbl.v1_4->display_path[i];
> }
> - /* fall through */
> + fallthrough;
> default:
> return NULL;
> }
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> index 68c4049..743042 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
> @@ -645,7 +645,7 @@ bool dce_aux_transfer_with_retries(struct ddc_service *ddc,
> case AUX_TRANSACTION_REPLY_AUX_DEFER:
> case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER:
> retry_on_defer = true;
> - /* fall through */
> + fallthrough;
> case AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK:
> if (++aux_defer_retries >= AUX_MAX_DEFER_RETRIES) {
> goto fail;
> diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
> index 8aa937f..51481e 100644
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
> @@ -479,7 +479,7 @@ static void program_grph_pixel_format(
> case SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F:
> sign = 1;
> floating = 1;
> - /* fall through */
> + fallthrough;
> case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F: /* shouldn't this get float too? */
> case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616:
> grph_depth = 3;
> --
> 2.24.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 025/491] AMD POWERPLAY: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (23 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 024/491] AMD DISPLAY CORE: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-12 14:10 ` Alex Deucher
2020-03-11 4:51 ` [PATCH -next 026/491] INTEL GVT-g DRIVERS (Intel GPU Virtualization): " Joe Perches
` (5 subsequent siblings)
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: linux-kernel
Cc: Evan Quan, Alex Deucher, Christian König,
David (ChunMing) Zhou, David Airlie, Daniel Vetter, amd-gfx,
dri-devel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index bf04cf..fc5236c 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -1250,7 +1250,7 @@ static void smu7_set_dpm_event_sources(struct pp_hwmgr *hwmgr, uint32_t sources)
switch (sources) {
default:
pr_err("Unknown throttling event sources.");
- /* fall through */
+ fallthrough;
case 0:
protection = false;
/* src is unused */
@@ -3698,12 +3698,12 @@ static int smu7_request_link_speed_change_before_state_change(
data->force_pcie_gen = PP_PCIEGen2;
if (current_link_speed == PP_PCIEGen2)
break;
- /* fall through */
+ fallthrough;
case PP_PCIEGen2:
if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false))
break;
#endif
- /* fall through */
+ fallthrough;
default:
data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr);
break;
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* Re: [PATCH -next 025/491] AMD POWERPLAY: Use fallthrough;
2020-03-11 4:51 ` [PATCH -next 025/491] AMD POWERPLAY: " Joe Perches
@ 2020-03-12 14:10 ` Alex Deucher
0 siblings, 0 replies; 84+ messages in thread
From: Alex Deucher @ 2020-03-12 14:10 UTC (permalink / raw)
To: Joe Perches
Cc: LKML, David Airlie, amd-gfx list, Maling list - DRI developers,
Alex Deucher, Evan Quan, Christian König
Applied. thanks! (link fixed locally).
Alex
On Wed, Mar 11, 2020 at 1:07 AM Joe Perches <joe@perches.com> wrote:
>
> Convert the various uses of fallthrough comments to fallthrough;
>
> Done via script
> Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> index bf04cf..fc5236c 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
> @@ -1250,7 +1250,7 @@ static void smu7_set_dpm_event_sources(struct pp_hwmgr *hwmgr, uint32_t sources)
> switch (sources) {
> default:
> pr_err("Unknown throttling event sources.");
> - /* fall through */
> + fallthrough;
> case 0:
> protection = false;
> /* src is unused */
> @@ -3698,12 +3698,12 @@ static int smu7_request_link_speed_change_before_state_change(
> data->force_pcie_gen = PP_PCIEGen2;
> if (current_link_speed == PP_PCIEGen2)
> break;
> - /* fall through */
> + fallthrough;
> case PP_PCIEGen2:
> if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false))
> break;
> #endif
> - /* fall through */
> + fallthrough;
> default:
> data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr);
> break;
> --
> 2.24.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 026/491] INTEL GVT-g DRIVERS (Intel GPU Virtualization): Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (24 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 025/491] AMD POWERPLAY: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 027/491] AMD XGBE DRIVER: " Joe Perches
` (4 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Zhenyu Wang, Zhi Wang
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, David Airlie,
Daniel Vetter, intel-gvt-dev, intel-gfx, dri-devel, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/gpu/drm/i915/gvt/handlers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index 1793f69..0e792f9 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -1225,7 +1225,7 @@ static int handle_g2v_notification(struct intel_vgpu *vgpu, int notification)
switch (notification) {
case VGT_G2V_PPGTT_L3_PAGE_TABLE_CREATE:
root_entry_type = GTT_TYPE_PPGTT_ROOT_L3_ENTRY;
- /* fall through */
+ fallthrough;
case VGT_G2V_PPGTT_L4_PAGE_TABLE_CREATE:
mm = intel_vgpu_get_ppgtt_mm(vgpu, root_entry_type, pdps);
return PTR_ERR_OR_ZERO(mm);
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH -next 027/491] AMD XGBE DRIVER: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (25 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 026/491] INTEL GVT-g DRIVERS (Intel GPU Virtualization): " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 028/491] BROADCOM BNX2X 10 GIGABIT ETHERNET " Joe Perches
` (3 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Tom Lendacky; +Cc: David S. Miller, netdev, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index b71f9b0..a51abf 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -1612,7 +1612,7 @@ static int xgbe_set_hwtstamp_settings(struct xgbe_prv_data *pdata,
/* PTP v2, UDP, any kind of event packet */
case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
- /* Fall through - to PTP v1, UDP, any kind of event packet */
+ fallthrough; /* to PTP v1, UDP, any kind of event packet */
case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSIPV4ENA, 1);
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSIPV6ENA, 1);
@@ -1623,7 +1623,7 @@ static int xgbe_set_hwtstamp_settings(struct xgbe_prv_data *pdata,
/* PTP v2, UDP, Sync packet */
case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
- /* Fall through - to PTP v1, UDP, Sync packet */
+ fallthrough; /* to PTP v1, UDP, Sync packet */
case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSIPV4ENA, 1);
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSIPV6ENA, 1);
@@ -1634,7 +1634,7 @@ static int xgbe_set_hwtstamp_settings(struct xgbe_prv_data *pdata,
/* PTP v2, UDP, Delay_req packet */
case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSVER2ENA, 1);
- /* Fall through - to PTP v1, UDP, Delay_req packet */
+ fallthrough; /* to PTP v1, UDP, Delay_req packet */
case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSIPV4ENA, 1);
XGMAC_SET_BITS(mac_tscr, MAC_TSCR, TSIPV6ENA, 1);
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 028/491] BROADCOM BNX2X 10 GIGABIT ETHERNET DRIVER: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (26 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 027/491] AMD XGBE DRIVER: " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 029/491] BROADCOM BNXT_EN 50 " Joe Perches
` (2 subsequent siblings)
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Ariel Elior, Sudarsana Kalluru, GR-everest-linux-l2
Cc: David S. Miller, netdev, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 14 +++++++-------
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 ++----
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 4 ++--
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 9638d65..07bc87 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -4708,14 +4708,14 @@ static void bnx2x_sync_link(struct link_params *params,
LINK_STATUS_SPEED_AND_DUPLEX_MASK) {
case LINK_10THD:
vars->duplex = DUPLEX_HALF;
- /* Fall thru */
+ fallthrough;
case LINK_10TFD:
vars->line_speed = SPEED_10;
break;
case LINK_100TXHD:
vars->duplex = DUPLEX_HALF;
- /* Fall thru */
+ fallthrough;
case LINK_100T4:
case LINK_100TXFD:
vars->line_speed = SPEED_100;
@@ -4723,14 +4723,14 @@ static void bnx2x_sync_link(struct link_params *params,
case LINK_1000THD:
vars->duplex = DUPLEX_HALF;
- /* Fall thru */
+ fallthrough;
case LINK_1000TFD:
vars->line_speed = SPEED_1000;
break;
case LINK_2500THD:
vars->duplex = DUPLEX_HALF;
- /* Fall thru */
+ fallthrough;
case LINK_2500TFD:
vars->line_speed = SPEED_2500;
break;
@@ -6335,7 +6335,7 @@ int bnx2x_set_led(struct link_params *params,
*/
if (!vars->link_up)
break;
- /* fall through */
+ fallthrough;
case LED_MODE_ON:
if (((params->phy[EXT_PHY1].type ==
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727) ||
@@ -12503,13 +12503,13 @@ static void bnx2x_phy_def_cfg(struct link_params *params,
switch (link_config & PORT_FEATURE_LINK_SPEED_MASK) {
case PORT_FEATURE_LINK_SPEED_10M_HALF:
phy->req_duplex = DUPLEX_HALF;
- /* fall through */
+ fallthrough;
case PORT_FEATURE_LINK_SPEED_10M_FULL:
phy->req_line_speed = SPEED_10;
break;
case PORT_FEATURE_LINK_SPEED_100M_HALF:
phy->req_duplex = DUPLEX_HALF;
- /* fall through */
+ fallthrough;
case PORT_FEATURE_LINK_SPEED_100M_FULL:
phy->req_line_speed = SPEED_100;
break;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index db5107e7..d0580d 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -8583,12 +8583,10 @@ int bnx2x_set_int_mode(struct bnx2x *bp)
BNX2X_DEV_INFO("Failed to enable multiple MSI-X (%d), set number of queues to %d\n",
bp->num_queues,
1 + bp->num_cnic_queues);
-
- /* fall through */
+ fallthrough;
case BNX2X_INT_MODE_MSI:
bnx2x_enable_msi(bp);
-
- /* fall through */
+ fallthrough;
case BNX2X_INT_MODE_INTX:
bp->num_ethernet_queues = 1;
bp->num_queues = bp->num_ethernet_queues + bp->num_cnic_queues;
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 5097a44..eeaeb9 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1830,7 +1830,7 @@ int bnx2x_iov_eq_sp_event(struct bnx2x *bp, union event_ring_elem *elem)
DP(BNX2X_MSG_IOV, "got VF [%d:%d] RSS update ramrod\n",
vf->abs_vfid, qidx);
bnx2x_vf_handle_rss_update_eqe(bp, vf);
- /* fall through */
+ fallthrough;
case EVENT_RING_OPCODE_VF_FLR:
/* Do nothing for now */
return 0;
@@ -2228,7 +2228,7 @@ int bnx2x_vf_free(struct bnx2x *bp, struct bnx2x_virtf *vf)
rc = bnx2x_vf_close(bp, vf);
if (rc)
goto op_err;
- /* Fall through - to release resources */
+ fallthrough; /* to release resources */
case VF_ACQUIRED:
DP(BNX2X_MSG_IOV, "about to free resources\n");
bnx2x_vf_free_resc(bp, vf);
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread
* [PATCH -next 029/491] BROADCOM BNXT_EN 50 GIGABIT ETHERNET DRIVER: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (27 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 028/491] BROADCOM BNX2X 10 GIGABIT ETHERNET " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 4:51 ` [PATCH -next 030/491] BROADCOM GENET " Joe Perches
2020-03-11 4:51 ` [PATCH -next 031/491] BROCADE BNA 10 GIGABIT " Joe Perches
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Michael Chan, Alexei Starovoitov, Daniel Borkmann,
David S. Miller, Jakub Kicinski, Jesper Dangaard Brouer,
John Fastabend
Cc: netdev, linux-kernel, bpf
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 17 ++++++++---------
.../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 4 ++--
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 ++--
3 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 663dcf..f964c2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -1923,7 +1923,7 @@ u32 bnxt_fw_health_readl(struct bnxt *bp, int reg_idx)
break;
case BNXT_FW_HEALTH_REG_TYPE_GRC:
reg_off = fw_health->mapped_regs[reg_idx];
- /* fall through */
+ fallthrough;
case BNXT_FW_HEALTH_REG_TYPE_BAR0:
val = readl(bp->bar0 + reg_off);
break;
@@ -1966,11 +1966,11 @@ static int bnxt_async_event_process(struct bnxt *bp,
}
set_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT, &bp->sp_event);
}
- /* fall through */
+ fallthrough;
case ASYNC_EVENT_CMPL_EVENT_ID_LINK_SPEED_CHANGE:
case ASYNC_EVENT_CMPL_EVENT_ID_PORT_PHY_CFG_CHANGE:
set_bit(BNXT_LINK_CFG_CHANGE_SP_EVENT, &bp->sp_event);
- /* fall through */
+ fallthrough;
case ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE:
set_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event);
break;
@@ -9400,8 +9400,7 @@ static int bnxt_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
switch (cmd) {
case SIOCGMIIPHY:
mdio->phy_id = bp->link_info.phy_addr;
-
- /* fallthru */
+ fallthrough;
case SIOCGMIIREG: {
u16 mii_regval = 0;
@@ -10644,7 +10643,7 @@ static void bnxt_fw_reset_writel(struct bnxt *bp, int reg_idx)
writel(reg_off & BNXT_GRC_BASE_MASK,
bp->bar0 + BNXT_GRCPF_REG_WINDOW_BASE_OUT + 4);
reg_off = (reg_off & BNXT_GRC_OFFSET_MASK) + 0x2000;
- /* fall through */
+ fallthrough;
case BNXT_FW_HEALTH_REG_TYPE_BAR0:
writel(val, bp->bar0 + reg_off);
break;
@@ -10757,7 +10756,7 @@ static void bnxt_fw_reset_task(struct work_struct *work)
}
bp->fw_reset_state = BNXT_FW_RESET_STATE_RESET_FW;
}
- /* fall through */
+ fallthrough;
case BNXT_FW_RESET_STATE_RESET_FW:
bnxt_reset_all(bp);
bp->fw_reset_state = BNXT_FW_RESET_STATE_ENABLE_DEV;
@@ -10780,7 +10779,7 @@ static void bnxt_fw_reset_task(struct work_struct *work)
}
pci_set_master(bp->pdev);
bp->fw_reset_state = BNXT_FW_RESET_STATE_POLL_FW;
- /* fall through */
+ fallthrough;
case BNXT_FW_RESET_STATE_POLL_FW:
bp->hwrm_cmd_timeout = SHORT_HWRM_CMD_TIMEOUT;
rc = __bnxt_hwrm_ver_get(bp, true);
@@ -10795,7 +10794,7 @@ static void bnxt_fw_reset_task(struct work_struct *work)
}
bp->hwrm_cmd_timeout = DFLT_HWRM_CMD_TIMEOUT;
bp->fw_reset_state = BNXT_FW_RESET_STATE_OPENING;
- /* fall through */
+ fallthrough;
case BNXT_FW_RESET_STATE_OPENING:
while (!rtnl_trylock()) {
bnxt_queue_fw_reset_work(bp, HZ / 10);
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index 677bab..af76ba6 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -1029,7 +1029,7 @@ static int bnxt_grxfh(struct bnxt *bp, struct ethtool_rxnfc *cmd)
if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV4)
cmd->data |= RXH_IP_SRC | RXH_IP_DST |
RXH_L4_B_0_1 | RXH_L4_B_2_3;
- /* fall through */
+ fallthrough;
case SCTP_V4_FLOW:
case AH_ESP_V4_FLOW:
case AH_V4_FLOW:
@@ -1048,7 +1048,7 @@ static int bnxt_grxfh(struct bnxt *bp, struct ethtool_rxnfc *cmd)
if (bp->rss_hash_cfg & VNIC_RSS_CFG_REQ_HASH_TYPE_UDP_IPV6)
cmd->data |= RXH_IP_SRC | RXH_IP_DST |
RXH_L4_B_0_1 | RXH_L4_B_2_3;
- /* fall through */
+ fallthrough;
case SCTP_V6_FLOW:
case AH_ESP_V6_FLOW:
case AH_V6_FLOW:
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
index c6f6f20..a974cb2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
@@ -200,10 +200,10 @@ bool bnxt_rx_xdp(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, u16 cons,
break;
default:
bpf_warn_invalid_xdp_action(act);
- /* Fall thru */
+ fallthrough;
case XDP_ABORTED:
trace_xdp_exception(bp->dev, xdp_prog, act);
- /* Fall thru */
+ fallthrough;
case XDP_DROP:
bnxt_reuse_rx_data(rxr, cons, page);
break;
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH -next 030/491] BROADCOM GENET ETHERNET DRIVER: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (28 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 029/491] BROADCOM BNXT_EN 50 " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
2020-03-11 16:35 ` Florian Fainelli
2020-03-11 4:51 ` [PATCH -next 031/491] BROCADE BNA 10 GIGABIT " Joe Perches
30 siblings, 1 reply; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Doug Berger, Florian Fainelli
Cc: David S. Miller, bcm-kernel-feedback-list, netdev, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++--
drivers/net/ethernet/broadcom/genet/bcmmii.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index c2fda12..f8c15ec 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -963,10 +963,10 @@ static void bcmgenet_update_mib_counters(struct bcmgenet_priv *priv)
continue;
case BCMGENET_STAT_RUNT:
offset += BCMGENET_STAT_OFFSET;
- /* fall through */
+ fallthrough;
case BCMGENET_STAT_MIB_TX:
offset += BCMGENET_STAT_OFFSET;
- /* fall through */
+ fallthrough;
case BCMGENET_STAT_MIB_RX:
val = bcmgenet_umac_readl(priv,
UMAC_MIB_START + j + offset);
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index d3003cb..b8e704f 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -216,7 +216,7 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
switch (priv->phy_interface) {
case PHY_INTERFACE_MODE_INTERNAL:
phy_name = "internal PHY";
- /* fall through */
+ fallthrough;
case PHY_INTERFACE_MODE_MOCA:
/* Irrespective of the actually configured PHY speed (100 or
* 1000) GENETv4 only has an internal GPHY so we will just end
--
2.24.0
^ permalink raw reply related [flat|nested] 84+ messages in thread
* [PATCH -next 031/491] BROCADE BNA 10 GIGABIT ETHERNET DRIVER: Use fallthrough;
2020-03-11 17:24 [PATCH -next 000/491] treewide: use fallthrough; Joe Perches
` (29 preceding siblings ...)
2020-03-11 4:51 ` [PATCH -next 030/491] BROADCOM GENET " Joe Perches
@ 2020-03-11 4:51 ` Joe Perches
30 siblings, 0 replies; 84+ messages in thread
From: Joe Perches @ 2020-03-11 4:51 UTC (permalink / raw)
To: Rasesh Mody, Sudarsana Kalluru, GR-Linux-NIC-Dev
Cc: David S. Miller, netdev, linux-kernel
Convert the various uses of fallthrough comments to fallthrough;
Done via script
Link: https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/ethernet/brocade/bna/bfa_ioc.c | 8 +++-----
drivers/net/ethernet/brocade/bna/bna_enet.c | 2 +-
drivers/net/ethernet/brocade/bna/bna_tx_rx.c | 3 +--
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/brocade/bna/bfa_ioc.c b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
index e17bfc..e9248c 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_ioc.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_ioc.c
@@ -321,7 +321,7 @@ bfa_ioc_sm_getattr(struct bfa_ioc *ioc, enum ioc_event event)
case IOC_E_PFFAILED:
case IOC_E_HWERROR:
del_timer(&ioc->ioc_timer);
- /* fall through */
+ fallthrough;
case IOC_E_TIMEOUT:
ioc->cbfn->enable_cbfn(ioc->bfa, BFA_STATUS_IOC_FAILURE);
bfa_fsm_set_state(ioc, bfa_ioc_sm_fail);
@@ -780,8 +780,7 @@ bfa_iocpf_sm_enabling(struct bfa_iocpf *iocpf, enum iocpf_event event)
case IOCPF_E_INITFAIL:
del_timer(&ioc->iocpf_timer);
- /* fall through */
-
+ fallthrough;
case IOCPF_E_TIMEOUT:
bfa_nw_ioc_hw_sem_release(ioc);
if (event == IOCPF_E_TIMEOUT)
@@ -849,8 +848,7 @@ bfa_iocpf_sm_disabling(struct bfa_iocpf *iocpf, enum iocpf_event event)
case IOCPF_E_FAIL:
del_timer(&ioc->iocpf_timer);
- /* fall through*/
-
+ fallthrough;
case IOCPF_E_TIMEOUT:
bfa_ioc_set_cur_ioc_fwstate(ioc, BFI_IOC_FAIL);
bfa_fsm_set_state(iocpf, bfa_iocpf_sm_disabling_sync);
diff --git a/drivers/net/ethernet/brocade/bna/bna_enet.c b/drivers/net/ethernet/brocade/bna/bna_enet.c
index 40107a9..a2c983 100644
--- a/drivers/net/ethernet/brocade/bna/bna_enet.c
+++ b/drivers/net/ethernet/brocade/bna/bna_enet.c
@@ -1084,7 +1084,7 @@ bna_enet_sm_cfg_wait(struct bna_enet *enet,
case ENET_E_CHLD_STOPPED:
bna_enet_rx_start(enet);
- /* Fall through */
+ fallthrough;
case ENET_E_FWRESP_PAUSE:
if (enet->flags & BNA_ENET_F_PAUSE_CHANGED) {
enet->flags &= ~BNA_ENET_F_PAUSE_CHANGED;
diff --git a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
index b5ecbfe..cd2bfb 100644
--- a/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
+++ b/drivers/net/ethernet/brocade/bna/bna_tx_rx.c
@@ -1636,8 +1636,7 @@ bna_bfi_rx_enet_start(struct bna_rx *rx)
&q1->qpt);
cfg_req->q_cfg[i].qs.rx_buffer_size =
htons((u16)q1->buffer_size);
- /* Fall through */
-
+ fallthrough;
case BNA_RXP_SINGLE:
/* Large/Single RxQ */
bfi_enet_datapath_q_init(&cfg_req->q_cfg[i].ql.q,
--
2.24.0
^ permalink raw reply [flat|nested] 84+ messages in thread