mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Zhan Xusheng <zhanxusheng1024@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-sched@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zhan Xusheng <zhanxusheng@xiaomi.com>
Subject: Re: [PATCH 1/2] sched/fair: fix comma operator misuse in NUMA fault accounting
Date: Fri, 19 Dec 2025 11:54:28 +0100	[thread overview]
Message-ID: <20251219105428.GD1132199@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20251219085005.50906-2-zhanxusheng@xiaomi.com>

On Fri, Dec 19, 2025 at 04:50:04PM +0800, Zhan Xusheng wrote:
> Replace the comma operator with separate statements when assigning
> NUMA fault statistics. This improves readability and follows kernel
> coding style.

This is the only one of the lot I would remotely consider applying. The
rest is just noise. Please don't do style patches.

> 
> Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
> ---
>  kernel/sched/fair.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index da46c3164537..56dd655d9bc2 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -13957,7 +13957,7 @@ void show_numa_stats(struct task_struct *p, struct seq_file *m)
>  			tpf = p->numa_faults[task_faults_idx(NUMA_MEM, node, 1)];
>  		}
>  		if (ng) {
> -			gsf = ng->faults[task_faults_idx(NUMA_MEM, node, 0)],
> +			gsf = ng->faults[task_faults_idx(NUMA_MEM, node, 0)];
>  			gpf = ng->faults[task_faults_idx(NUMA_MEM, node, 1)];
>  		}
>  		print_numa_stats(m, node, tsf, tpf, gsf, gpf);
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-12-19 10:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19  8:50 [PATCH 0/2] sched/fair: cleanups and readability fixes Zhan Xusheng
2025-12-19  8:50 ` [PATCH 1/2] sched/fair: fix comma operator misuse in NUMA fault accounting Zhan Xusheng
2025-12-19 10:54   ` Peter Zijlstra [this message]
2025-12-19  8:50 ` [PATCH 2/2] sched/fair: replace bare 'unsigned' with 'unsigned int' Zhan Xusheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251219105428.GD1132199@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sched@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=zhanxusheng1024@gmail.com \
    --cc=zhanxusheng@xiaomi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®