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]
Date:   Sat, 22 Oct 2016 21:54:19 +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 2/6] IA64-sba_iommu: Combine four seq_printf() calls into two
 calls in ioc_show()

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

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

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 arch/ia64/hp/common/sba_iommu.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 282f5c1..0688441 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -1906,14 +1906,20 @@ ioc_show(struct seq_file *s, void *v)
 	if (ioc->node != NUMA_NO_NODE)
 		seq_printf(s, "NUMA node       : %d\n", ioc->node);
 #endif
-	seq_printf(s, "IOVA size       : %ld MB\n", ((ioc->pdir_size >> 3) * iovp_size)/(1024*1024));
-	seq_printf(s, "IOVA page size  : %ld kb\n", iovp_size/1024);
+	seq_printf(s,
+		   "IOVA size       : %ld MB\n"
+		   "IOVA page size  : %ld kb\n",
+		   ((ioc->pdir_size >> 3) * iovp_size) / (1024 * 1024)),
+		   iovp_size / 1024);
 
 	for (i = 0; i < (ioc->res_size / sizeof(unsigned long)); ++i, ++res_ptr)
 		used += hweight64(*res_ptr);
 
-	seq_printf(s, "PDIR size       : %d entries\n", ioc->pdir_size >> 3);
-	seq_printf(s, "PDIR used       : %d entries\n", used);
+	seq_printf(s,
+		   "PDIR size       : %d entries\n"
+		   "PDIR used       : %d entries\n",
+		   ioc->pdir_size >> 3,
+		   used);
 
 #ifdef PDIR_SEARCH_TIMING
 	{
-- 
2.10.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ