From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
"David S. Miller" <davem@davemloft.net>,
linux-hams@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] rose: use %*ph specifier
Date: Fri, 05 Sep 2014 21:23:40 +0400 [thread overview]
Message-ID: <5409F19C.7010209@cogentembedded.com> (raw)
In-Reply-To: <1409929311-3225-1-git-send-email-andriy.shevchenko@linux.intel.com>
On 09/05/2014 07:01 PM, Andy Shevchenko wrote:
> Instead of dereference each byte let's use %*ph specifier in the printk()
> calls.
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> net/rose/rose_link.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c
> index bc55142..ce60771 100644
> --- a/net/rose/rose_link.c
> +++ b/net/rose/rose_link.c
> @@ -160,7 +160,7 @@ void rose_link_rx_restart(struct sk_buff *skb, struct rose_neigh *neigh, unsigne
> break;
>
> case ROSE_DIAGNOSTIC:
> - printk(KERN_WARNING "ROSE: received diagnostic #%d - %02X %02X %02X\n", skb->data[3], skb->data[4], skb->data[5], skb->data[6]);
> + pr_warn("ROSE: received diagnostic #%d - %4ph\n", skb->data + 3);
Er, this doesn't seem right. The equivalent code would be:
pr_warn("ROSE: received diagnostic #%d - %3ph\n", skb->data[3], skb->data + 4);
WBR, Sergei
prev parent reply other threads:[~2014-09-05 17:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 15:01 [PATCH] rose: use %*ph specifier Andy Shevchenko
2014-09-05 15:17 ` Eric Dumazet
2014-09-05 15:22 ` Andy Shevchenko
2014-09-05 17:23 ` Sergei Shtylyov [this message]
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=5409F19C.7010209@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=linux-hams@vger.kernel.org \
--cc=netdev@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;
as well as URLs for NNTP newsgroup(s).