ARM-OMAP2+: Fine-tuning for five function implementations
Subsystems (5)
cover ARM-OMAP2+: Fine-tuning for five function implementations
From: Markus Elfring <[email protected]>
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(-)
Signature · 1 line
2.10.1
PATCH 1/3 ARM-OMAP2+: mux: Replace three seq_printf() calls by seq_puts()
From: Markus Elfring <[email protected]>
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.
--- arch/arm/mach-omap2/mux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/mux.c +3 -3
@@ -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",
Signature · 1 line
2.10.1
PATCH 2/3 ARM-OMAP2+: mux: Use seq_putc() in omap_mux_dbg_signal_show()
In reply to SF Markus ElfringFrom: Markus Elfring <[email protected]>
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.
--- arch/arm/mach-omap2/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/mux.c +1 -1
@@ -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,
Signature · 1 line
2.10.1
PATCH 3/3 ARM-OMAP2+: pm-debug: Use seq_putc() in two functions
In reply to SF Markus ElfringFrom: Markus Elfring <[email protected]>
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.
--- arch/arm/mach-omap2/pm-debug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/pm-debug.c +2 -3
@@ -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 ; }
Signature · 1 line
2.10.1
Tony Lindgren
maintainerQuoted 10 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sat, 15 Oct 2016 22:44:22 +0200A few update suggestions were taken into account
from static source code analysis.Markus Elfring (3):
mux: Replace threeseq_printf()calls byseq_puts()
mux: Useseq_putc()inomap_mux_dbg_signal_show()
pm-debug: Useseq_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