linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations
@ 2016-10-15 20:50 SF Markus Elfring
  2016-10-15 20:52 ` [PATCH 1/3] ARM-OMAP2+: mux: Replace three seq_printf() calls by seq_puts() SF Markus Elfring
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: SF Markus Elfring @ 2016-10-15 20:50 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 15 Oct 2016 22:44:22 +0200

A few update suggestions were taken into account
from static source code analysis.

Markus Elfring (3):
  mux: Replace three seq_printf() calls by seq_puts()
  mux: Use seq_putc() in omap_mux_dbg_signal_show()
  pm-debug: Use seq_putc() in two functions

 arch/arm/mach-omap2/mux.c      | 8 ++++----
 arch/arm/mach-omap2/pm-debug.c | 5 ++---
 2 files changed, 6 insertions(+), 7 deletions(-)

-- 
2.10.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ARM-OMAP2+: mux: Replace three seq_printf() calls by seq_puts()
  2016-10-15 20:50 [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations SF Markus Elfring
@ 2016-10-15 20:52 ` SF Markus Elfring
  2016-10-15 20:53 ` [PATCH 2/3] ARM-OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show() SF Markus Elfring
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: SF Markus Elfring @ 2016-10-15 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 15 Oct 2016 22:22:09 +0200

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

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/mach-omap2/mux.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 176eef6..4bdfa3d 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -561,7 +561,7 @@ static inline void omap_mux_decode(struct seq_file *s, u16 val)
 	do {
 		seq_printf(s, "%s", flags[i]);
 		if (i > 0)
-			seq_printf(s, " | ");
+			seq_puts(s, " | ");
 	} while (i-- > 0);
 }
 
@@ -602,7 +602,7 @@ static int omap_mux_dbg_board_show(struct seq_file *s, void *unused)
 		 */
 		seq_printf(s, "OMAP%d_MUX(%s, ", omap_gen, m0_def);
 		omap_mux_decode(s, val);
-		seq_printf(s, "),\n");
+		seq_puts(s, "),\n");
 	}
 
 	return 0;
@@ -659,7 +659,7 @@ static int omap_mux_dbg_signal_show(struct seq_file *s, void *unused)
 			partition->phys + m->reg_offset, m->reg_offset, val,
 			m->balls[0] ? m->balls[0] : none,
 			m->balls[1] ? m->balls[1] : none);
-	seq_printf(s, "mode: ");
+	seq_puts(s, "mode: ");
 	omap_mux_decode(s, val);
 	seq_printf(s, "\n");
 	seq_printf(s, "signals: %s | %s | %s | %s | %s | %s | %s | %s\n",
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ARM-OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show()
  2016-10-15 20:50 [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations SF Markus Elfring
  2016-10-15 20:52 ` [PATCH 1/3] ARM-OMAP2+: mux: Replace three seq_printf() calls by seq_puts() SF Markus Elfring
@ 2016-10-15 20:53 ` SF Markus Elfring
  2016-10-15 20:54 ` [PATCH 3/3] ARM-OMAP2+: pm-debug: Use seq_putc() in two functions SF Markus Elfring
  2016-10-20 13:13 ` [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: SF Markus Elfring @ 2016-10-15 20:53 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 15 Oct 2016 22:24:29 +0200

A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/mach-omap2/mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 4bdfa3d..e1fa39e 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -661,7 +661,7 @@ static int omap_mux_dbg_signal_show(struct seq_file *s, void *unused)
 			m->balls[1] ? m->balls[1] : none);
 	seq_puts(s, "mode: ");
 	omap_mux_decode(s, val);
-	seq_printf(s, "\n");
+	seq_putc(s, '\n');
 	seq_printf(s, "signals: %s | %s | %s | %s | %s | %s | %s | %s\n",
 			m->muxnames[0] ? m->muxnames[0] : none,
 			m->muxnames[1] ? m->muxnames[1] : none,
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM-OMAP2+: pm-debug: Use seq_putc() in two functions
  2016-10-15 20:50 [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations SF Markus Elfring
  2016-10-15 20:52 ` [PATCH 1/3] ARM-OMAP2+: mux: Replace three seq_printf() calls by seq_puts() SF Markus Elfring
  2016-10-15 20:53 ` [PATCH 2/3] ARM-OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show() SF Markus Elfring
@ 2016-10-15 20:54 ` SF Markus Elfring
  2016-10-20 13:13 ` [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: SF Markus Elfring @ 2016-10-15 20:54 UTC (permalink / raw)
  To: linux-arm-kernel

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sat, 15 Oct 2016 22:30:44 +0200

A single character (line break) should be put into a sequence at the end.
Thus use the corresponding function "seq_putc".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/mach-omap2/pm-debug.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index 0b33986..003a6cb 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -114,8 +114,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user)
 		seq_printf(s, ",RET-MEMBANK%d-OFF:%d", i + 1,
 				pwrdm->ret_mem_off_counter[i]);
 
-	seq_printf(s, "\n");
-
+	seq_putc(s, '\n');
 	return 0;
 }
 
@@ -138,7 +137,7 @@ static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user)
 		seq_printf(s, ",%s:%lld", pwrdm_state_names[i],
 			pwrdm->state_timer[i]);
 
-	seq_printf(s, "\n");
+	seq_putc(s, '\n');
 	return 0;
 }
 
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations
  2016-10-15 20:50 [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations SF Markus Elfring
                   ` (2 preceding siblings ...)
  2016-10-15 20:54 ` [PATCH 3/3] ARM-OMAP2+: pm-debug: Use seq_putc() in two functions SF Markus Elfring
@ 2016-10-20 13:13 ` Tony Lindgren
  3 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2016-10-20 13:13 UTC (permalink / raw)
  To: linux-arm-kernel

* SF Markus Elfring <elfring@users.sourceforge.net> [161015 13:51]:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Sat, 15 Oct 2016 22:44:22 +0200
> 
> A few update suggestions were taken into account
> from static source code analysis.
> 
> Markus Elfring (3):
>   mux: Replace three seq_printf() calls by seq_puts()
>   mux: Use seq_putc() in omap_mux_dbg_signal_show()
>   pm-debug: Use seq_putc() in two functions

Thanks will be applying for v4.10 merge window. FYI, chances
are that arch/arm/mach-map2/mux.c will get dropped for v4.10
unless we run into regressions.

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-20 13:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-15 20:50 [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations SF Markus Elfring
2016-10-15 20:52 ` [PATCH 1/3] ARM-OMAP2+: mux: Replace three seq_printf() calls by seq_puts() SF Markus Elfring
2016-10-15 20:53 ` [PATCH 2/3] ARM-OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show() SF Markus Elfring
2016-10-15 20:54 ` [PATCH 3/3] ARM-OMAP2+: pm-debug: Use seq_putc() in two functions SF Markus Elfring
2016-10-20 13:13 ` [PATCH 0/3] ARM-OMAP2+: Fine-tuning for five function implementations Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).