public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Joe Perches <joe@perches.com>,
	Thierry Reding <treding@nvidia.com>
Cc: kernel-janitors@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tinydrm: mipi-dbi: Adjust buffer output in mipi_dbi_debugfs_command_show()
Date: Wed, 10 May 2017 16:31:04 +0000	[thread overview]
Message-ID: <b4852b8a-e649-0116-e8f4-5e2ed956cbb8@tronnes.org> (raw)
In-Reply-To: <f385d46e-cd60-ce57-d9c5-da23ad69e262@users.sourceforge.net>


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

  reply	other threads:[~2017-05-10 16:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-05-10 19:26       ` Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4852b8a-e649-0116-e8f4-5e2ed956cbb8@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=elfring@users.sourceforge.net \
    --cc=fengguang.wu@intel.com \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox