tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show()
Subsystems (3)
PATCH 1/1 tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show()
From: Markus Elfring <[email protected]>
Date: Mon, 8 May 2017 13:42:03 +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.
--- drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/tinydrm/mipi-dbi.c +1 -1
@@ -946,7 +946,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)for (i =0 ; i < len; i++)seq_printf (m,"%02x" , val[i]); -seq_puts (m,"\n" ); +seq_putc (m,'\n' ); }return 0 ;
Signature · 1 line
2.12.2
Den 08.05.2017 13.54, skrev SF Markus Elfring:
Quoted 10 lines
From: Markus Elfring <[email protected]>
Date: Mon, 8 May 2017 13:42:03 +0200A 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 <[email protected]>---
Thanks,
Quoted 8 lines
drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/tinydrm/mipi-dbi.c +0
-0
drivers/gpu/drm/tinydrm/mipi-dbi.c static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused) · line 952
Quoted 8 lines
drivers/gpu/drm/tinydrm/mipi-dbi.c +1
-1@@ -946,7 +946,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)for (i =0 ; i < len; i++)seq_printf (m,"%02x" , val[i]); -seq_puts (m,"\n" ); +seq_putc (m,'\n' ); }return 0 ;
--
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
Quoted 3 lines · Noralf Trønnes
Den 08.05.2017 13.54, skrev SF Markus Elfring:
Quoted 2 lines
A single character (line break) should be put into a sequence. Thus use the corresponding function "
seq_putc".
Markus, I know this is hard for you,
but think more before sending patches.
Quoted 1 line
drivers/gpu/drm/tinydrm/mipi-dbi.c
Quoted 1 line
drivers/gpu/drm/tinydrm/mipi-dbi.c +0
-0
[]
Quoted 6 lines
drivers/gpu/drm/tinydrm/mipi-dbi.c static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused) · line 949
Quoted 6 lines
drivers/gpu/drm/tinydrm/mipi-dbi.c +1
-1@@ -946,7 +946,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)for (i =0 ; i < len; i++)seq_printf (m,"%02x" , val[i]); -seq_puts (m,"\n" ); +seq_putc (m,'\n' );
Use the %p<foo> extensions.
seq_printf(m, "%*phN\n", len, val)
--
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
PATCH 1/1 tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show()
From: Markus Elfring <[email protected]>
Date: Wed, 10 May 2017 17:03:20 +0200
* Use a special format string specification for the desired output of the array "val" into a sequence.
* Adjust two local variables accordingly.
This refactoring supersedes the update suggestion "tinydrm: mipi-dbi:
Use seq_putc() in mipi_dbi_debugfs_command_show()" from 2017-05-08.
https://patchwork.kernel.org/patch/9716119/
--- drivers/gpu/drm/tinydrm/mipi-dbi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/gpu/drm/tinydrm/mipi-dbi.c +2 -5
@@ -914,8 +914,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused) {struct mipi_dbi *mipi = m->private;u8 cmd, val[4 ]; -size_t len, i; -int ret; +int len, ret;for (cmd =0 ; cmd <255 ; cmd++) {if (!mipi_dbi_command_is_read (mipi, cmd))
@@ -944,9 +943,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)continue ; } -for (i =0 ; i < len; i++) -seq_printf (m,"%02x" , val[i]); -seq_puts (m,"\n" ); +seq_printf (m,"%*phN\n" , len, val); }return 0 ;
Signature · 1 line
2.12.3
Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show()
Den 10.05.2017 17.15, skrev SF Markus Elfring:
Quoted 12 lines
From: Markus Elfring <[email protected]>
Date: Wed, 10 May 2017 17:03:20 +0200* Use a special format string specification for the desired output of the array "val" into a sequence.
* Adjust two local variables accordingly.
This refactoring supersedes the update suggestion "tinydrm: mipi-dbi:
Useseq_putc()inmipi_dbi_debugfs_command_show()" from 2017-05-08.
https://patchwork.kernel.org/patch/9716119/
Quoted 5 lines
Fixes 02dd95fe316936269a52d6ccb971bb956412b40a ("drm/tinydrm: Add MIPI DBI support")Suggested-by Joe Perches <[email protected]>Signed-off-by Markus Elfring <[email protected]>---
Thanks again,
Quoted 18 lines
drivers/gpu/drm/tinydrm/mipi-dbi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/gpu/drm/tinydrm/mipi-dbi.c +1
-2@@ -914,8 +914,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused) {struct mipi_dbi *mipi = m->private;u8 cmd, val[4 ]; -size_t len, i; -int ret; +int len, ret;for (cmd =0 ; cmd <255 ; cmd++) {if (!mipi_dbi_command_is_read (mipi, cmd))
drivers/gpu/drm/tinydrm/mipi-dbi.c static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused) · line 949
Quoted 10 lines
drivers/gpu/drm/tinydrm/mipi-dbi.c +1
-3@@ -944,9 +943,7 @@ static int mipi_dbi_debugfs_command_show(struct seq_file *m, void *unused)continue ; } -for (i =0 ; i < len; i++) -seq_printf (m,"%02x" , val[i]); -seq_puts (m,"\n" ); +seq_printf (m,"%*phN\n" , len, val); }return 0 ;
--
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
Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show()
In reply to SF Markus ElfringQuoted 11 lines · SF Markus Elfring
From: Markus Elfring <[email protected]>
Date: Wed, 10 May 2017 17:03:20 +0200* Use a special format string specification for the desired output of the array "val" into a sequence.
* Adjust two local variables accordingly.
This refactoring supersedes the update suggestion "tinydrm: mipi-dbi:
Useseq_putc()inmipi_dbi_debugfs_command_show()" from 2017-05-08.
https://patchwork.kernel.org/patch/9716119/
This is not how to send v2 patches.
Quoted 2 lines
Fixes 02dd95fe316936269a52d6ccb971bb956412b40a ("drm/tinydrm: Add MIPI DBI support")
This is not a bug fix so do not use the fixes tag.
regards,
dan carpenter