netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/sched: act_ife: convert comma to semicolon
@ 2025-11-12  7:27 Chen Ni
  2025-11-12 10:50 ` Jamal Hadi Salim
  2025-11-14  1:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Chen Ni @ 2025-11-12  7:27 UTC (permalink / raw)
  To: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, horms
  Cc: netdev, linux-kernel, Chen Ni

Replace comma between expressions with semicolons.

Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.

Found by inspection.
No functional change intended.
Compile tested only.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
 net/sched/act_ife.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
index 7c6975632fc2..1dfdda6c2d4c 100644
--- a/net/sched/act_ife.c
+++ b/net/sched/act_ife.c
@@ -649,9 +649,9 @@ static int tcf_ife_dump(struct sk_buff *skb, struct tc_action *a, int bind,
 
 	memset(&opt, 0, sizeof(opt));
 
-	opt.index = ife->tcf_index,
-	opt.refcnt = refcount_read(&ife->tcf_refcnt) - ref,
-	opt.bindcnt = atomic_read(&ife->tcf_bindcnt) - bind,
+	opt.index = ife->tcf_index;
+	opt.refcnt = refcount_read(&ife->tcf_refcnt) - ref;
+	opt.bindcnt = atomic_read(&ife->tcf_bindcnt) - bind;
 
 	spin_lock_bh(&ife->tcf_lock);
 	opt.action = ife->tcf_action;
-- 
2.25.1


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

* Re: [PATCH] net/sched: act_ife: convert comma to semicolon
  2025-11-12  7:27 [PATCH] net/sched: act_ife: convert comma to semicolon Chen Ni
@ 2025-11-12 10:50 ` Jamal Hadi Salim
  2025-11-21 11:47   ` Simon Horman
  2025-11-14  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Jamal Hadi Salim @ 2025-11-12 10:50 UTC (permalink / raw)
  To: Chen Ni
  Cc: xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, horms,
	netdev, linux-kernel

On Wed, Nov 12, 2025 at 2:28 AM Chen Ni <nichen@iscas.ac.cn> wrote:
>
> Replace comma between expressions with semicolons.
>
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
>

IIRC, Simon brought this up in the review as well...

> Found by inspection.
> No functional change intended.
> Compile tested only.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>

Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>

cheers,
jamal

> ---
>  net/sched/act_ife.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/sched/act_ife.c b/net/sched/act_ife.c
> index 7c6975632fc2..1dfdda6c2d4c 100644
> --- a/net/sched/act_ife.c
> +++ b/net/sched/act_ife.c
> @@ -649,9 +649,9 @@ static int tcf_ife_dump(struct sk_buff *skb, struct tc_action *a, int bind,
>
>         memset(&opt, 0, sizeof(opt));
>
> -       opt.index = ife->tcf_index,
> -       opt.refcnt = refcount_read(&ife->tcf_refcnt) - ref,
> -       opt.bindcnt = atomic_read(&ife->tcf_bindcnt) - bind,
> +       opt.index = ife->tcf_index;
> +       opt.refcnt = refcount_read(&ife->tcf_refcnt) - ref;
> +       opt.bindcnt = atomic_read(&ife->tcf_bindcnt) - bind;
>
>         spin_lock_bh(&ife->tcf_lock);
>         opt.action = ife->tcf_action;
> --
> 2.25.1
>

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

* Re: [PATCH] net/sched: act_ife: convert comma to semicolon
  2025-11-12  7:27 [PATCH] net/sched: act_ife: convert comma to semicolon Chen Ni
  2025-11-12 10:50 ` Jamal Hadi Salim
@ 2025-11-14  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-14  1:30 UTC (permalink / raw)
  To: Chen Ni
  Cc: jhs, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni, horms,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 12 Nov 2025 15:27:09 +0800 you wrote:
> Replace comma between expressions with semicolons.
> 
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
> 
> Found by inspection.
> No functional change intended.
> Compile tested only.
> 
> [...]

Here is the summary with links:
  - net/sched: act_ife: convert comma to semicolon
    https://git.kernel.org/netdev/net-next/c/205305c028ad

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH] net/sched: act_ife: convert comma to semicolon
  2025-11-12 10:50 ` Jamal Hadi Salim
@ 2025-11-21 11:47   ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2025-11-21 11:47 UTC (permalink / raw)
  To: Jamal Hadi Salim
  Cc: Chen Ni, xiyou.wangcong, jiri, davem, edumazet, kuba, pabeni,
	netdev, linux-kernel

On Wed, Nov 12, 2025 at 05:50:36AM -0500, Jamal Hadi Salim wrote:
> On Wed, Nov 12, 2025 at 2:28 AM Chen Ni <nichen@iscas.ac.cn> wrote:
> >
> > Replace comma between expressions with semicolons.
> >
> > Using a ',' in place of a ';' can have unintended side effects.
> > Although that is not the case here, it is seems best to use ';'
> > unless ',' is intended.
> >
> 
> IIRC, Simon brought this up in the review as well...

Yes, I might have.
But at any rate I agree with the analysis above.

> 
> > Found by inspection.
> > No functional change intended.
> > Compile tested only.
> >
> > Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> 
> Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>

...

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

end of thread, other threads:[~2025-11-21 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12  7:27 [PATCH] net/sched: act_ife: convert comma to semicolon Chen Ni
2025-11-12 10:50 ` Jamal Hadi Salim
2025-11-21 11:47   ` Simon Horman
2025-11-14  1:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).