public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: "Joe Perches" <joe@perches.com>,
	linux-ia64@vger.kernel.org, "Al Viro" <viro@zeniv.linux.org.uk>,
	"Borislav Petkov" <bp@suse.de>,
	"Fenghua Yu" <fenghua.yu@intel.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Hans-Christian Noren Egtvedt" <egtvedt@samfundet.no>,
	"Ingo Molnar" <mingo@kernel.org>, "Jörg Rödel" <jroedel@suse.de>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Robert Richter" <rrichter@cavium.com>,
	"Robin Murphy" <robin.murphy@arm.com>,
	"Tony Luck" <tony.luck@intel.com>,
	"Toshi Kani" <toshi.kani@hpe.com>,
	"Vineet Gupta" <vgupta@synopsys.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 6/6] IA64-sn2_smp: Combine two seq_printf() calls into one call in sn2_ptc_seq_show()
Date: Sun, 23 Oct 2016 05:42:05 +0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1610230741400.1972@hadrien> (raw)
In-Reply-To: <72f6fc41-9bf8-2eef-848f-8eefba7dade6@users.sourceforge.net>



On Sat, 22 Oct 2016, SF Markus Elfring wrote:

> >> @@ -494,12 +494,11 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data)
> >>  	int cpu;
> >>
> >>  	cpu = *(loff_t *) data;
> >> -
> >> -	if (!cpu) {
> >> +	if (!cpu)
> >>  		seq_printf(file,
> >> -			   "# cpu ptc_l newrid ptc_flushes nodes_flushed deadlocks lock_nsec shub_nsec shub_nsec_max not_my_mm deadlock2 ipi_fluches ipi_nsec\n");
> >> -		seq_printf(file, "# ptctest %d, flushopt %d\n", sn2_ptctest, sn2_flush_opt);
> >> -	}
> >> +			   "# cpu ptc_l newrid ptc_flushes nodes_flushed deadlocks lock_nsec shub_nsec shub_nsec_max not_my_mm deadlock2 ipi_fluches ipi_nsec\n"
> >> +			   "# ptctest %d, flushopt %d\n",
> >> +			   sn2_ptctest, sn2_flush_opt);
> >>
> >>  	if (cpu < nr_cpu_ids && cpu_online(cpu)) {
> >>  		stat = &per_cpu(ptcstats, cpu);
> >
> > Please think more.
> >
> > printf has to inspect character by character looking for
> > a vsprintf % character and 0 termination.
> >
> > seq_puts does a strlen then memcpy.
>
> Would you prefer to use this function also at this source code place?

I think that he is expecting that you will figure out the answer by
yourself.

julia

  reply	other threads:[~2016-10-23  5:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-22 19:50 [PATCH 0/6] IA64: Fine-tuning for five function implementations SF Markus Elfring
2016-10-22 19:53 ` [PATCH 1/6] IA64-sba_iommu: Use seq_puts() in ioc_show() SF Markus Elfring
2016-10-22 19:54 ` [PATCH 2/6] IA64-sba_iommu: Combine four seq_printf() calls into two calls " SF Markus Elfring
2016-10-22 19:55 ` [PATCH 3/6] IA64-simserial: Use seq_puts() in rs_proc_show() SF Markus Elfring
2016-10-22 19:56 ` [PATCH 4/6] IA64-setup: Use seq_putc() in show_cpuinfo() SF Markus Elfring
2016-10-22 19:57 ` [PATCH 5/6] IA64-sn_hwperf: Use seq_puts() in sn_topology_show() SF Markus Elfring
2016-10-22 19:58 ` [PATCH 6/6] IA64-sn2_smp: Combine two seq_printf() calls into one call in sn2_ptc_seq_show() SF Markus Elfring
2016-10-22 20:07   ` Joe Perches
2016-10-22 20:48     ` SF Markus Elfring
2016-10-23  5:42       ` Julia Lawall [this message]
2016-10-23  6:33         ` SF Markus Elfring

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=alpine.DEB.2.20.1610230741400.1972@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=bp@suse.de \
    --cc=egtvedt@samfundet.no \
    --cc=elfring@users.sourceforge.net \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=jroedel@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rrichter@cavium.com \
    --cc=tony.luck@intel.com \
    --cc=toshi.kani@hpe.com \
    --cc=vgupta@synopsys.com \
    --cc=viro@zeniv.linux.org.uk \
    /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