From: Lee Jones <lee@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer
Date: Wed, 21 Jun 2023 18:10:40 +0100 [thread overview]
Message-ID: <20230621171040.GK10378@google.com> (raw)
In-Reply-To: <20230612212007.3621-1-andriy.shevchenko@linux.intel.com>
On Tue, 13 Jun 2023, Andy Shevchenko wrote:
> The kernel already has a helper to print a hexdump of a small
> buffer via pointer extension. Use that instead of open coded
> variant.
That's not all you're doing is it?
Nice try. 2 patches please.
> In long term it helps to kill pr_cont() or at least narrow down
> its use.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/mfd/ipaq-micro.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mfd/ipaq-micro.c b/drivers/mfd/ipaq-micro.c
> index 6d3968458e81..57fb7874fc91 100644
> --- a/drivers/mfd/ipaq-micro.c
> +++ b/drivers/mfd/ipaq-micro.c
> @@ -131,10 +131,8 @@ static void micro_rx_msg(struct ipaq_micro *micro, u8 id, int len, u8 *data)
> break;
> default:
> dev_err(micro->dev,
> - "unknown msg %d [%d] ", id, len);
> - for (i = 0; i < len; ++i)
> - pr_cont("0x%02x ", data[i]);
> - pr_cont("\n");
> + "unknown msg %d [%d] %*ph\n", id, len, len, data);
> + break;
> }
> spin_unlock(µ->lock);
> }
> --
> 2.40.0.1.gaa8946217a0b
>
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2023-06-21 17:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 21:20 [PATCH v1 1/1] mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer Andy Shevchenko
2023-06-21 17:10 ` Lee Jones [this message]
2023-06-22 12:31 ` Andy Shevchenko
2023-06-22 14:00 ` Lee Jones
2023-06-22 14:56 ` Andy Shevchenko
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=20230621171040.GK10378@google.com \
--to=lee@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
/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