From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] arm64: kernel: use seq_puts() instead of seq_printf()
Date: Tue, 28 Jan 2014 15:51:56 +0000 [thread overview]
Message-ID: <20140128155156.GC24617@arm.com> (raw)
In-Reply-To: <001f01cf1bc9$57767070$06635150$%han@samsung.com>
On Tue, Jan 28, 2014 at 01:36:18AM +0000, Jingoo Han wrote:
> For a constant format without additional arguments, use seq_puts()
> instead of seq_printf(). Also, it fixes the following checkpatch
> warning.
>
> WARNING: Prefer seq_puts to seq_printf
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> arch/arm64/kernel/setup.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index c8e9eff..4507691 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -416,7 +416,7 @@ static int c_show(struct seq_file *m, void *v)
> seq_printf(m, "%s ", hwcap_str[i]);
>
> seq_printf(m, "\nCPU implementer\t: 0x%02x\n", read_cpuid_id() >> 24);
> - seq_printf(m, "CPU architecture: AArch64\n");
> + seq_puts(m, "CPU architecture: AArch64\n");
> seq_printf(m, "CPU variant\t: 0x%x\n", (read_cpuid_id() >> 20) & 15);
> seq_printf(m, "CPU part\t: 0x%03x\n", (read_cpuid_id() >> 4) & 0xfff);
> seq_printf(m, "CPU revision\t: %d\n", read_cpuid_id() & 15);
Just ignore the checkpatch warning. I prefer the consistency of
seq_printf() in this function.
--
Catalin
next prev parent reply other threads:[~2014-01-28 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 1:35 [PATCH 1/2] arm64: use num_possible_cpus() instead of NR_CPUS Jingoo Han
2014-01-28 1:36 ` [PATCH 2/2] arm64: kernel: use seq_puts() instead of seq_printf() Jingoo Han
2014-01-28 15:51 ` Catalin Marinas [this message]
2014-01-29 4:54 ` Jingoo Han
2014-01-29 5:00 ` Joe Perches
2014-01-28 10:11 ` [PATCH 1/2] arm64: use num_possible_cpus() instead of NR_CPUS Sudeep Holla
2014-01-29 5:31 ` Jingoo Han
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=20140128155156.GC24617@arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).