mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: peterz@infradead.org
To: Xu Wang <vulab@iscas.ac.cn>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] stats: Replace seq_printf with seq_puts
Date: Wed, 16 Sep 2020 10:12:25 +0200	[thread overview]
Message-ID: <20200916081225.GJ2674@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200916034415.25645-1-vulab@iscas.ac.cn>

On Wed, Sep 16, 2020 at 03:44:15AM +0000, Xu Wang wrote:
> seq_puts is a lot cheaper than seq_printf, so use that to print
> literal strings.

performance is not a consideration here.

> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  kernel/sched/stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
> index 750fb3c67eed..0818fe03407a 100644
> --- a/kernel/sched/stats.c
> +++ b/kernel/sched/stats.c
> @@ -37,7 +37,7 @@ static int show_schedstat(struct seq_file *seq, void *v)
>  		    rq->rq_cpu_time,
>  		    rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);
>  
> -		seq_printf(seq, "\n");
> +		seq_putc(seq, '\n');

And yet, the changelog says seq_put*s*().

>  
>  #ifdef CONFIG_SMP
>  		/* domain-specific stats */
> -- 
> 2.17.1
> 

      reply	other threads:[~2020-09-16  8:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16  3:44 Xu Wang
2020-09-16  8:12 ` peterz [this message]

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=20200916081225.GJ2674@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vulab@iscas.ac.cn \
    /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®