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: <04517191-f1f5-19ca-d4bc-d3d5331b4556@users.sourceforge.net>
Date:   Sun, 7 May 2017 19:18:06 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     linux-s390@...r.kernel.org,
        Christian Bornträger <borntraeger@...ibm.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        Ingo Molnar <mingo@...nel.org>,
        Martin Schwidefsky <schwidefsky@...ibm.com>,
        Paul Gortmaker <paul.gortmaker@...driver.com>,
        Peter Oberparleiter <oberpar@...ux.vnet.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Sascha Silbe <silbe@...ux.vnet.ibm.com>,
        Vegard Nossum <vegard.nossum@...cle.com>,
        Viktor Mihajlovski <mihajlov@...ux.vnet.ibm.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 4/4] s390/sysinfo: Combine two function calls into one

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sun, 7 May 2017 18:48:39 +0200

A bit of data was put into a sequence by two separate function calls
at four places. Print the same data by single function calls instead.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/s390/kernel/sysinfo.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index e7061fcd047a..7f81d40c8f90 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -98,8 +98,7 @@ static void stsi_1_1_1(struct seq_file *m, struct sysinfo_1_1_1 *info)
 	seq_printf(m, "Model:                %-16.16s", info->model_capacity);
 	if (info->model[0] != '\0')
 		seq_printf(m, " %-16.16s", info->model);
-	seq_putc(m, '\n');
-	seq_printf(m, "Sequence Code:        %-16.16s\n", info->sequence);
+	seq_printf(m, "\nSequence Code:        %-16.16s\n", info->sequence);
 	seq_printf(m, "Plant:                %-4.4s\n", info->plant);
 	seq_printf(m, "Model Capacity:       %-16.16s %08u\n",
 		   info->model_capacity, info->model_cap_rating);
@@ -200,8 +199,7 @@ static void stsi_2_2_2(struct seq_file *m, struct sysinfo_2_2_2 *info)
 	if (stsi(info, 2, 2, 2))
 		return;
 	EBCASC(info->name, sizeof(info->name));
-	seq_putc(m, '\n');
-	seq_printf(m, "LPAR Number:          %d\n", info->lpar_number);
+	seq_printf(m, "\nLPAR Number:          %d\n", info->lpar_number);
 	seq_puts(m, "LPAR Characteristics: ");
 	if (info->characteristics & LPAR_CHAR_DEDICATED)
 		seq_puts(m, "Dedicated ");
@@ -209,8 +207,7 @@ static void stsi_2_2_2(struct seq_file *m, struct sysinfo_2_2_2 *info)
 		seq_puts(m, "Shared ");
 	if (info->characteristics & LPAR_CHAR_LIMITED)
 		seq_puts(m, "Limited ");
-	seq_putc(m, '\n');
-	seq_printf(m, "LPAR Name:            %-8.8s\n", info->name);
+	seq_printf(m, "\nLPAR Name:            %-8.8s\n", info->name);
 	seq_printf(m, "LPAR Adjustment:      %d\n", info->caf);
 	seq_printf(m, "LPAR CPUs Total:      %d\n", info->cpus_total);
 	seq_printf(m, "LPAR CPUs Configured: %d\n", info->cpus_configured);
@@ -256,8 +253,8 @@ static void stsi_3_2_2(struct seq_file *m, struct sysinfo_3_2_2 *info)
 	for (i = 0; i < info->count; i++) {
 		EBCASC(info->vm[i].name, sizeof(info->vm[i].name));
 		EBCASC(info->vm[i].cpi, sizeof(info->vm[i].cpi));
-		seq_putc(m, '\n');
-		seq_printf(m, "VM%02d Name:            %-8.8s\n", i, info->vm[i].name);
+		seq_printf(m, "\nVM%02d Name:            %-8.8s\n",
+			   i, info->vm[i].name);
 		seq_printf(m, "VM%02d Control Program: %-16.16s\n", i, info->vm[i].cpi);
 		seq_printf(m, "VM%02d Adjustment:      %d\n", i, info->vm[i].caf);
 		seq_printf(m, "VM%02d CPUs Total:      %d\n", i, info->vm[i].cpus_total);
-- 
2.12.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ