Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638959
| From | Noralf Trønnes <noralf@tronnes.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show() |
| Date | 2017-05-10 18:40 +0200 |
| Message-ID | <tFCOC-31A-7@gated-at.bofh.it> (permalink) |
| References | <tEPux-3tj-1@gated-at.bofh.it> <tFhh8-4SQ-21@gated-at.bofh.it> <tFi3v-5s6-5@gated-at.bofh.it> <tFBzc-2lT-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[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
csiph-web