From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933775AbcJQJyF (ORCPT ); Mon, 17 Oct 2016 05:54:05 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35134 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933302AbcJQJxw (ORCPT ); Mon, 17 Oct 2016 05:53:52 -0400 Subject: Re: [PATCH] ARM64-cpuinfo: Combine six calls for sequence output into one seq_printf() call in c_show() To: SF Markus Elfring , linux-arm-kernel@lists.infradead.org, "Suzuki K. Poulose" , Will Deacon References: <83d98772-8872-1b75-a9a5-5f08b8462e18@users.sourceforge.net> Cc: kernel-janitors@vger.kernel.org, LKML From: Matthias Brugger Message-ID: <10543939-0baf-1057-2325-9ec5361e8b40@gmail.com> Date: Mon, 17 Oct 2016 11:37:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <83d98772-8872-1b75-a9a5-5f08b8462e18@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/10/16 21:03, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 16 Oct 2016 20:48:28 +0200 > > Some data were printed into a sequence by six separate function calls. > Print the same data by a single function call instead. > > Signed-off-by: Markus Elfring > --- Reviewed-by: Matthias Brugger > arch/arm64/kernel/cpuinfo.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c > index b3d5b3e..f22687d 100644 > --- a/arch/arm64/kernel/cpuinfo.c > +++ b/arch/arm64/kernel/cpuinfo.c > @@ -148,14 +148,17 @@ static int c_show(struct seq_file *m, void *v) > if (elf_hwcap & (1 << j)) > seq_printf(m, " %s", hwcap_str[j]); > } > - seq_puts(m, "\n"); > - > - seq_printf(m, "CPU implementer\t: 0x%02x\n", > - MIDR_IMPLEMENTOR(midr)); > - seq_printf(m, "CPU architecture: 8\n"); > - seq_printf(m, "CPU variant\t: 0x%x\n", MIDR_VARIANT(midr)); > - seq_printf(m, "CPU part\t: 0x%03x\n", MIDR_PARTNUM(midr)); > - seq_printf(m, "CPU revision\t: %d\n\n", MIDR_REVISION(midr)); > + seq_printf(m, > + "\n" > + "CPU implementer\t: 0x%02x\n" > + "CPU architecture: 8\n" > + "CPU variant\t: 0x%x\n" > + "CPU part\t: 0x%03x\n" > + "CPU revision\t: %d\n\n", > + MIDR_IMPLEMENTOR(midr), > + MIDR_VARIANT(midr), > + MIDR_PARTNUM(midr), > + MIDR_REVISION(midr)); > } > > return 0; >