From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: linux-snps-arc@lists.infradead.org
Subject: Re: [PATCH] ARC-setup: Use seq_putc() in show_cpuinfo()
Date: Mon, 17 Oct 2016 16:25:54 +0000 [thread overview]
Message-ID: <579aaf85-c22d-b680-5ce8-3c0e23ab6d7e@synopsys.com> (raw)
In-Reply-To: <164a402a-de20-645d-00af-9a414cf745c4@users.sourceforge.net>
On 10/15/2016 12:56 PM, SF Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 15 Oct 2016 21:31:16 +0200
>
> A single character (line break) should be put into a sequence.
> Thus use the corresponding function "seq_putc".
Perhaps reword the changelog to say that seqc_putc is more efficient than
seqc_printf to output a single char.
I mean _printf is not wrong but not as efficient ?
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> arch/arc/kernel/setup.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
> index 3df7f9c..e3f5432 100644
> --- a/arch/arc/kernel/setup.c
> +++ b/arch/arc/kernel/setup.c
> @@ -494,8 +494,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
>
> free_page((unsigned long)str);
> done:
> - seq_printf(m, "\n");
> -
> + seq_putc(m, '\n');
> return 0;
> }
>
next prev parent reply other threads:[~2016-10-17 16:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-15 19:56 [PATCH] ARC-setup: Use seq_putc() in show_cpuinfo() SF Markus Elfring
2016-10-17 16:25 ` Vineet Gupta [this message]
2016-10-17 17:19 ` SF Markus Elfring
2016-10-17 17:23 ` Vineet Gupta
2016-10-17 17:39 ` 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=579aaf85-c22d-b680-5ce8-3c0e23ab6d7e@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=linux-snps-arc@lists.infradead.org \
/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