Skip to contentSkip to conversation

ARM/orion/gpio: Replace three seq_printf() calls by seq_puts() in orion_gpio_dbg_show()

PATCH In review SF Markus Elfring 3 participants 3 messages Oct 16, 2016 – Oct 17, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM/orion/gpio: Replace three seq_printf() calls by seq_puts() in orion_gpio_dbg_show()

From: Markus Elfring <[email protected]>
Date: Sun, 16 Oct 2016 12:30:48 +0200

Strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

---
 arch/arm/plat-orion/gpio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-orion/gpio.c +3 -3
index f740693..26a531e 100644
@@ -478,13 +478,13 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 			   (data_in ^ in_pol) & msk  ? "hi" : "lo",
 			   in_pol & msk ? "lo" : "hi");
 		if (!((edg_msk | lvl_msk) & msk)) {
-			seq_printf(s, " disabled\n");
+			seq_puts(s, " disabled\n");
 			continue;
 		}
 		if (edg_msk & msk)
-			seq_printf(s, " edge ");
+			seq_puts(s, " edge ");
 		if (lvl_msk & msk)
-			seq_printf(s, " level");
+			seq_puts(s, " level");
 		seq_printf(s, " (%s)\n", cause & msk ? "pending" : "clear  ");
 	}
 }
Signature · 1 line
2.10.1
#2 lore raw
In reply to SF Markus Elfring

Hi Markus,

Quoted 8 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Sun, 16 Oct 2016 12:30:48 +0200

Strings which did not contain data format specifications should be put into a sequence. Thus use the corresponding function "seq_puts".

This issue was detected by using the Coccinelle software.

Applied on mvebu/drivers

Thanks,

Gregory

Quoted 29 lines
---
 arch/arm/plat-orion/gpio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-orion/gpio.c +3 -3
index f740693..26a531e 100644
@@ -478,13 +478,13 @@ static void orion_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
 			   (data_in ^ in_pol) & msk  ? "hi" : "lo",
 			   in_pol & msk ? "lo" : "hi");
 		if (!((edg_msk | lvl_msk) & msk)) {
-			seq_printf(s, " disabled\n");
+			seq_puts(s, " disabled\n");
 			continue;
 		}
 		if (edg_msk & msk)
-			seq_printf(s, " edge ");
+			seq_puts(s, " edge ");
 		if (lvl_msk & msk)
-			seq_printf(s, " level");
+			seq_puts(s, " level");
 		seq_printf(s, " (%s)\n", cause & msk ? "pending" : "clear  ");
 	}
 }
Signature · 1 line
2.10.1
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com