Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1637404 > unrolled thread
| Started by | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| First post | 2017-05-08 14:00 +0200 |
| Last post | 2017-05-10 21:30 +0200 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-08 14:00 +0200
Re: [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() Noralf Trønnes <noralf@tronnes.org> - 2017-05-09 19:40 +0200
Re: [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() Joe Perches <joe@perches.com> - 2017-05-09 20:30 +0200
[PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-10 17:20 +0200
Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() Noralf Trønnes <noralf@tronnes.org> - 2017-05-10 18:40 +0200
Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() Dan Carpenter <dan.carpenter@oracle.com> - 2017-05-10 21:30 +0200
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-08 14:00 +0200 |
| Subject | [PATCH] tinydrm: mipi-dbi: Use seq_putc() in mipi_dbi_debugfs_command_show() |
| Message-ID | <tEPux-3tj-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-05-09 19:40 +0200 |
| Message-ID | <tFhh8-4SQ-21@gated-at.bofh.it> |
| In reply to | #1637404 |
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;
[toc] | [prev] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-05-09 20:30 +0200 |
| Message-ID | <tFi3v-5s6-5@gated-at.bofh.it> |
| In reply to | #1638322 |
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)
[toc] | [prev] | [next] | [standalone]
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Date | 2017-05-10 17:20 +0200 |
| Subject | [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() |
| Message-ID | <tFBzc-2lT-23@gated-at.bofh.it> |
| In reply to | #1638338 |
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
[toc] | [prev] | [next] | [standalone]
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Date | 2017-05-10 18:40 +0200 |
| Subject | Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() |
| Message-ID | <tFCOC-31A-7@gated-at.bofh.it> |
| In reply to | #1638907 |
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;
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-05-10 21:30 +0200 |
| Subject | Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() |
| Message-ID | <tFFt8-4EF-15@gated-at.bofh.it> |
| In reply to | #1638907 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web