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


Groups > linux.kernel > #1501563 > unrolled thread

[PATCH 2/4] AVR32-clock: Combine nine seq_printf() calls into one call in clk_show()

Started bySF Markus Elfring <elfring@users.sourceforge.net>
First post2016-10-16 22:40 +0200
Last post2016-10-16 22:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/4] AVR32-clock: Combine nine seq_printf() calls into one  call in clk_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-10-16 22:40 +0200

#1501563 — [PATCH 2/4] AVR32-clock: Combine nine seq_printf() calls into one call in clk_show()

FromSF Markus Elfring <elfring@users.sourceforge.net>
Date2016-10-16 22:40 +0200
Subject[PATCH 2/4] AVR32-clock: Combine nine seq_printf() calls into one call in clk_show()
Message-ID<st0nT-2dB-5@gated-at.bofh.it>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 16 Oct 2016 22:04:10 +0200

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

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/avr32/mach-at32ap/clock.c | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/arch/avr32/mach-at32ap/clock.c b/arch/avr32/mach-at32ap/clock.c
index a912a72..fdf1cae 100644
--- a/arch/avr32/mach-at32ap/clock.c
+++ b/arch/avr32/mach-at32ap/clock.c
@@ -261,15 +261,25 @@ static int clk_show(struct seq_file *s, void *unused)
 	struct clk 	*clk;
 
 	/* show all the power manager registers */
-	seq_printf(s, "MCCTRL  = %8x\n", pm_readl(MCCTRL));
-	seq_printf(s, "CKSEL   = %8x\n", pm_readl(CKSEL));
-	seq_printf(s, "CPUMASK = %8x\n", pm_readl(CPU_MASK));
-	seq_printf(s, "HSBMASK = %8x\n", pm_readl(HSB_MASK));
-	seq_printf(s, "PBAMASK = %8x\n", pm_readl(PBA_MASK));
-	seq_printf(s, "PBBMASK = %8x\n", pm_readl(PBB_MASK));
-	seq_printf(s, "PLL0    = %8x\n", pm_readl(PLL0));
-	seq_printf(s, "PLL1    = %8x\n", pm_readl(PLL1));
-	seq_printf(s, "IMR     = %8x\n", pm_readl(IMR));
+	seq_printf(s,
+		   "MCCTRL  = %8x\n"
+		   "CKSEL   = %8x\n"
+		   "CPUMASK = %8x\n"
+		   "HSBMASK = %8x\n"
+		   "PBAMASK = %8x\n"
+		   "PBBMASK = %8x\n"
+		   "PLL0    = %8x\n"
+		   "PLL1    = %8x\n"
+		   "IMR     = %8x\n",
+		   pm_readl(MCCTRL),
+		   pm_readl(CKSEL),
+		   pm_readl(CPU_MASK),
+		   pm_readl(HSB_MASK),
+		   pm_readl(PBA_MASK),
+		   pm_readl(PBB_MASK),
+		   pm_readl(PLL0),
+		   pm_readl(PLL1),
+		   pm_readl(IMR));
 	for (i = 0; i < 8; i++) {
 		if (i == 5)
 			continue;
-- 
2.10.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web