From patchwork Tue Jul 2 12:56:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Elfring X-Patchwork-Id: 1126250 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45dPdl1KsYz9sND for ; Tue, 2 Jul 2019 23:06:51 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=web.de header.i=@web.de header.b="gWI13cK9"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45dPdk57XWzDqNK for ; Tue, 2 Jul 2019 23:06:50 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=web.de (client-ip=212.227.15.3; helo=mout.web.de; envelope-from=markus.elfring@web.de; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=web.de Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=web.de header.i=@web.de header.b="gWI13cK9"; dkim-atps=neutral X-Greylist: delayed 362 seconds by postgrey-1.36 at bilbo; Tue, 02 Jul 2019 23:03:29 AEST Received: from mout.web.de (mout.web.de [212.227.15.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 45dPYs1SvXzDqD3 for ; Tue, 2 Jul 2019 23:03:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1562072575; bh=pVAuHARMLI90BQfldqhr/7I5PIxe6kQyhlRsdBPrcFM=; h=X-UI-Sender-Class:To:From:Subject:Cc:Date; b=gWI13cK9c7wkkcc+axnID5t9H1O3vp5RWnub1PZwQbLb0fiaOcCcTRp+EJtr851e8 aSf9cCHPLIZCLK4dAwgX4DJsKNTty3TjGmFGgC8dcmdXZJdFZoVK8K8NCkKdU68y9Q MWTfDQhkY+IGf9SGCazybpTbmKQ0SoN/J00/Yj4k= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from [192.168.1.2] ([78.48.11.114]) by smtp.web.de (mrweb003 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MbyJ4-1i0NBo0f2c-00JJS7; Tue, 02 Jul 2019 14:57:02 +0200 To: linuxppc-dev@lists.ozlabs.org, Andrew Morton , "Aneesh Kumar K.V" , Benjamin Herrenschmidt , Christophe Leroy , Michael Ellerman , Mike Rapoport , Paul Mackerras From: Markus Elfring Subject: [PATCH] powerpc/setup: Adjust six seq_printf() calls in show_cpuinfo() Openpgp: preference=signencrypt Autocrypt: addr=Markus.Elfring@web.de; prefer-encrypt=mutual; keydata= mQINBFg2+xABEADBJW2hoUoFXVFWTeKbqqif8VjszdMkriilx90WB5c0ddWQX14h6w5bT/A8 +v43YoGpDNyhgA0w9CEhuwfZrE91GocMtjLO67TAc2i2nxMc/FJRDI0OemO4VJ9RwID6ltwt mpVJgXGKkNJ1ey+QOXouzlErVvE2fRh+KXXN1Q7fSmTJlAW9XJYHS3BDHb0uRpymRSX3O+E2 lA87C7R8qAigPDZi6Z7UmwIA83ZMKXQ5stA0lhPyYgQcM7fh7V4ZYhnR0I5/qkUoxKpqaYLp YHBczVP+Zx/zHOM0KQphOMbU7X3c1pmMruoe6ti9uZzqZSLsF+NKXFEPBS665tQr66HJvZvY GMDlntZFAZ6xQv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gMzPVWIRElwpcXr+yGoTLAOpG7nkAUBBj9n9TPpSdt/npfok9ZfL /Q+ranrxb2Cy4tvOPxeVfR58XveX85ICrW9VHPVq9sJf/a24bMm6+qEg1V/G7u/AM3fM8U2m tdrTqOrfxklZ7beppGKzC1/WLrcr072vrdiN0icyOHQlfWmaPv0pUnW3AwtiMYngT96BevfA qlwaymjPTvH+cTXScnbydfOQW8220JQwykUe+sHRZfAF5TS2YCkQvsyf7vIpSqo/ttDk4+xc Z/wsLiWTgKlih2QYULvW61XU+mWsK8+ZlYUrRMpkauN4CJ5yTpvp+Orcz5KixHQmc5tbkLWf x0n1QFc1xxJhbzN+r9djSGGN/5IBDfUqSANC8cWzHpWaHmSuU3JSAMB/N+yQjIad2ztTckZY pwT6oxng29LzZspTYUEzMz3wK2jQHw+U66qBFk8whA7B2uAU1QdGyPgahLYSOa4XAEGb6wbI FEE= Message-ID: <5b62379e-a35f-4f56-f1b5-6350f76007e7@web.de> Date: Tue, 2 Jul 2019 14:56:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Language: en-US X-Provags-ID: V03:K1:CHSj/T2I1H2IUKUbSut3k3betOz9ySJnjr+q1z0JO5FzO6JDPNu YDIvH23ZFoLROOrSMAWSsuESAfamBVNo1CIY8kllwqdngkMAdNN12HGClZZqq/Fh87OlHZ+ kL5yC/NEbuUmHz0kMrBbr/hNXzKXEng4g5YHU6GXIT+9/HsOrFkPvArm2gP21g55giFp2S9 TxQNt+sMrJecvThy62wng== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:r3rOcbfgVwg=:RMCqK8HEhLADnGxfA4Z3KN XhqGaOpSO6Ck8vcDzLvScMz2bGGIlNRoe1BwWUYS3GtHW/X3q1St9+1Dql+EhYdfxRZ+IjXu7 0FmoCiJOgypR7bwZKGsndVKnmyqCdQv2kDwANg5lPmoFx9NDgm+mypsJPHMcEdUTbF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developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, LKML Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Markus Elfring Date: Tue, 2 Jul 2019 14:41:42 +0200 A bit of information should be put into a sequence. Thus improve the execution speed for this data output by better usage of corresponding functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- arch/powerpc/kernel/setup-common.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) -- 2.22.0 diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 1f8db666468d..a381723b11bd 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -239,18 +239,17 @@ static int show_cpuinfo(struct seq_file *m, void *v) maj = (pvr >> 8) & 0xFF; min = pvr & 0xFF; - seq_printf(m, "processor\t: %lu\n", cpu_id); - seq_printf(m, "cpu\t\t: "); + seq_printf(m, "processor\t: %lu\ncpu\t\t: ", cpu_id); if (cur_cpu_spec->pvr_mask && cur_cpu_spec->cpu_name) - seq_printf(m, "%s", cur_cpu_spec->cpu_name); + seq_puts(m, cur_cpu_spec->cpu_name); else seq_printf(m, "unknown (%08x)", pvr); if (cpu_has_feature(CPU_FTR_ALTIVEC)) - seq_printf(m, ", altivec supported"); + seq_puts(m, ", altivec supported"); - seq_printf(m, "\n"); + seq_putc(m, '\n'); #ifdef CONFIG_TAU if (cpu_has_feature(CPU_FTR_TAU)) { @@ -332,7 +331,7 @@ static int show_cpuinfo(struct seq_file *m, void *v) seq_printf(m, "bogomips\t: %lu.%02lu\n", loops_per_jiffy / (500000 / HZ), (loops_per_jiffy / (5000 / HZ)) % 100); - seq_printf(m, "\n"); + seq_putc(m, '\n'); /* If this is the last cpu, print the summary */ if (cpumask_next(cpu_id, cpu_online_mask) >= nr_cpu_ids)