lkml.org 
[lkml]   [2016]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/6] IA64-sba_iommu: Combine four seq_printf() calls into two calls in ioc_show()
From
Date
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
\
 
 \ /
  Last update: 2016-10-22 21:55    [W:0.065 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site