ARC-setup: Use seq_putc() in show_cpuinfo()
Subsystems (2)
PATCH 1/1 ARC-setup: Use seq_putc() in show_cpuinfo()
From: Markus Elfring <[email protected]>
Date: Sat, 15 Oct 2016 21:31:16 +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/arc/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arc/kernel/setup.c +1 -2
@@ -494,8 +494,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)free_page ((unsigned long )str); done: -seq_printf (m,"\n" ); - +seq_putc (m,'\n' );return 0 ; }
Signature · 1 line
2.10.1
Quoted 5 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Sat, 15 Oct 2016 21:31:16 +0200A single character (line break) should be put into a sequence. Thus use the corresponding function "
seq_putc".
Perhaps reword the changelog to say that seqc_putc is more efficient than seqc_printf to output a single char.
I mean _printf is not wrong but not as efficient ?
Quoted 22 lines
This issue was detected by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>--- arch/arc/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)arch/arc/kernel/setup.c +1
-2@@ -494,8 +494,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)free_page ((unsigned long )str); done: -seq_printf (m,"\n" ); - +seq_putc (m,'\n' );return 0 ; }
Quoted 6 lines
Quoted 2 lines
A single character (line break) should be put into a sequence. Thus use the corresponding function "
seq_putc".Perhaps reword the changelog to say that
seqc_putcis more efficient thanseqc_printfto output a single char.
I mean_printfis not wrong but not as efficient ?
I came along source files for a few other software modules with similar change possibilities.
Unfortunately, the corresponding developers are not convinced yet to replace a call of the function "seq_printf" at the end by a "seq_putc" because of software efficiency reasons.
Do you find this update suggestion acceptable to some degree for the function "setup"?
Regards,
Markus
Quoted 10 lines · SF Markus Elfring
Quoted 5 lines
Quoted 2 lines
A single character (line break) should be put into a sequence. Thus use the corresponding function "
seq_putc".Perhaps reword the changelog to say that
seqc_putcis more efficient thanseqc_printfto output a single char.
I mean_printfis not wrong but not as efficient ?I came along source files for a few other software modules with similar change possibilities.
Unfortunately, the corresponding developers are not convinced yet to replace a call of the function "seq_printf" at the end by a "seq_putc" because of software efficiency reasons.
I was ambivalent so far - but not anymore :-)
what is the objection - can you point me to a few links where people don't think this is not a good idea.
Quoted 6 lines
Do you find this update suggestion acceptable to some degree for the function "setup"?
Regards,
Markus
Quoted 10 lines
Quoted 8 lines
Quoted 3 lines
Perhaps reword the changelog to say that
seqc_putcis more efficient thanseqc_printfto output a single char.
I mean_printfis not wrong but not as efficient ?I came along source files for a few other software modules with similar change possibilities.
Unfortunately, the corresponding developers are not convinced yet to replace a call of the function "seq_printf" at the end by a "seq_putc" because of software efficiency reasons.I was ambivalent so far - but not anymore :-)
Interesting …
Quoted 2 lines
what is the objection - can you point me to a few links where people don't think this is not a good idea.
Yes, of course. - Does the double negation in this wording indicate another special software development concern?
How do you think about another update suggestion like "[PATCH] MD-RAID: Use seq_putc() in three status functions" (from 2016-10-16)?
https://patchwork.kernel.org/patch/9378055/
https://lkml.kernel.org/r/<[email protected]>
Quoted 2 lines
Quoted 2 lines
Do you find this update suggestion acceptable to some degree for the function "setup"?
I am curious what your opinions will be for further development of the function "show_cpuinfo" in the source file "arch/arc/kernel/setup.c".
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html