lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3e12189-6122-e806-6cb2-b2518e64e983@users.sourceforge.net>
Date:   Sat, 22 Oct 2016 21:58:51 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-ia64@...r.kernel.org, Al Viro <viro@...iv.linux.org.uk>,
        Borislav Petkov <bp@...e.de>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hans-Christian Noren Egtvedt <egtvedt@...fundet.no>,
        Ingo Molnar <mingo@...nel.org>,
        Jörg Rödel <jroedel@...e.de>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Robert Richter <rrichter@...ium.com>,
        Robin Murphy <robin.murphy@....com>,
        Tony Luck <tony.luck@...el.com>,
        Toshi Kani <toshi.kani@....com>,
        Vineet Gupta <vgupta@...opsys.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 6/6] IA64-sn2_smp: Combine two seq_printf() calls into one
 call in sn2_ptc_seq_show()

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 22 Oct 2016 21:19:03 +0200

Some data were printed into a sequence by two separate function calls.
Print the same data by a single function call instead.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/ia64/sn/kernel/sn2/sn2_smp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index c98dc96..1beac3c 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -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);
-- 
2.10.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ