* [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() @ 2017-05-08 11:54 SF Markus Elfring 2017-05-09 17:29 ` Noralf Trønnes 0 siblings, 1 reply; 6+ messages in thread From: SF Markus Elfring @ 2017-05-08 11:54 UTC (permalink / raw) To: dri-devel, Daniel Vetter, David Airlie, Fengguang Wu, Thierry Reding Cc: kernel-janitors, LKML From: Markus Elfring <elfring@users.sourceforge.net> 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. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c index f4eb412f3604..54d66b732d55 100644 --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c @@ -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; -- 2.12.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() 2017-05-08 11:54 [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() SF Markus Elfring @ 2017-05-09 17:29 ` Noralf Trønnes 2017-05-09 18:23 ` Joe Perches 0 siblings, 1 reply; 6+ messages in thread From: Noralf Trønnes @ 2017-05-09 17:29 UTC (permalink / raw) To: SF Markus Elfring, dri-devel, Daniel Vetter, David Airlie, Fengguang Wu, Thierry Reding Cc: kernel-janitors, LKML Den 08.05.2017 13.54, skrev SF Markus Elfring: > From: Markus Elfring <elfring@users.sourceforge.net> > 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. > > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- Thanks, Acked-by: Noralf Trønnes <noralf@tronnes.org> > drivers/gpu/drm/tinydrm/mipi-dbi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c > index f4eb412f3604..54d66b732d55 100644 > --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c > +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c > @@ -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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() 2017-05-09 17:29 ` Noralf Trønnes @ 2017-05-09 18:23 ` Joe Perches 2017-05-10 15:15 ` [PATCH] tinydrm: mipi-dbi: Adjust buffer output " SF Markus Elfring 0 siblings, 1 reply; 6+ messages in thread From: Joe Perches @ 2017-05-09 18:23 UTC (permalink / raw) To: Noralf Trønnes, SF Markus Elfring, dri-devel, Daniel Vetter, David Airlie, Fengguang Wu, Thierry Reding Cc: kernel-janitors, LKML On Tue, 2017-05-09 at 19:29 +0200, Noralf Trønnes wrote: > Den 08.05.2017 13.54, skrev SF Markus Elfring: > > 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. > > diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c [] > > @@ -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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() 2017-05-09 18:23 ` Joe Perches @ 2017-05-10 15:15 ` SF Markus Elfring 2017-05-10 16:31 ` Noralf Trønnes 2017-05-10 19:26 ` Dan Carpenter 0 siblings, 2 replies; 6+ messages in thread From: SF Markus Elfring @ 2017-05-10 15:15 UTC (permalink / raw) To: dri-devel, Daniel Vetter, David Airlie, Fengguang Wu, Joe Perches, Noralf Trønnes, Thierry Reding Cc: kernel-janitors, LKML From: Markus Elfring <elfring@users.sourceforge.net> 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/ Fixes: 02dd95fe316936269a52d6ccb971bb956412b40a ("drm/tinydrm: Add MIPI DBI support") Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/gpu/drm/tinydrm/mipi-dbi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c index f4eb412f3604..2670259d1798 100644 --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c @@ -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; -- 2.12.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() 2017-05-10 15:15 ` [PATCH] tinydrm: mipi-dbi: Adjust buffer output " SF Markus Elfring @ 2017-05-10 16:31 ` Noralf Trønnes 2017-05-10 19:26 ` Dan Carpenter 1 sibling, 0 replies; 6+ messages in thread From: Noralf Trønnes @ 2017-05-10 16:31 UTC (permalink / raw) To: SF Markus Elfring, dri-devel, Daniel Vetter, David Airlie, Fengguang Wu, Joe Perches, Thierry Reding Cc: kernel-janitors, LKML Den 10.05.2017 17.15, skrev SF Markus Elfring: > From: Markus Elfring <elfring@users.sourceforge.net> > 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/ > > Fixes: 02dd95fe316936269a52d6ccb971bb956412b40a ("drm/tinydrm: Add MIPI DBI support") > > Suggested-by: Joe Perches <joe@perches.com> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> > --- Thanks again, Acked-by: Noralf Trønnes <noralf@tronnes.org> > drivers/gpu/drm/tinydrm/mipi-dbi.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c > index f4eb412f3604..2670259d1798 100644 > --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c > +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c > @@ -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; -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() 2017-05-10 15:15 ` [PATCH] tinydrm: mipi-dbi: Adjust buffer output " SF Markus Elfring 2017-05-10 16:31 ` Noralf Trønnes @ 2017-05-10 19:26 ` Dan Carpenter 1 sibling, 0 replies; 6+ messages in thread From: Dan Carpenter @ 2017-05-10 19:26 UTC (permalink / raw) To: SF Markus Elfring Cc: Thierry Reding, Daniel Vetter, kernel-janitors, LKML, dri-devel, Joe Perches, Fengguang Wu On Wed, May 10, 2017 at 05:15:33PM +0200, SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > 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/ This is not how to send v2 patches. > > Fixes: 02dd95fe316936269a52d6ccb971bb956412b40a ("drm/tinydrm: Add MIPI DBI support") This is not a bug fix so do not use the fixes tag. regards, dan carpenter ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-10 19:26 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-05-08 11:54 [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() SF Markus Elfring 2017-05-09 17:29 ` Noralf Trønnes 2017-05-09 18:23 ` Joe Perches 2017-05-10 15:15 ` [PATCH] tinydrm: mipi-dbi: Adjust buffer output " SF Markus Elfring 2017-05-10 16:31 ` Noralf Trønnes 2017-05-10 19:26 ` Dan Carpenter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox