Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1506591

[PATCH 2/6] IA64-sba_iommu: Combine four seq_printf() calls into two calls in ioc_show()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 2/6] IA64-sba_iommu: Combine four seq_printf() calls into two calls in ioc_show()
Date 2016-10-22 22:00 +0200
Message-ID <svaCt-7IO-5@gated-at.bofh.it> (permalink)
References <svaCt-7IO-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.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@users.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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 2/6] IA64-sba_iommu: Combine four seq_printf() calls into two  calls in ioc_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-22 22:00 +0200

csiph-web