* [PATCH v2] rose: use %*ph specifier
@ 2014-09-05 15:32 Andy Shevchenko
2014-09-05 15:52 ` Eric Dumazet
2014-09-07 23:07 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2014-09-05 15:32 UTC (permalink / raw)
To: David S . Miller, linux-hams, netdev, Eric Dumazet; +Cc: Andy Shevchenko
Instead of dereference each byte let's use %*ph specifier in the printk()
calls.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
- Since v1:
- compile tested
- fix a wrong argument list
net/rose/rose_link.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c
index bc55142..e873d7d 100644
--- a/net/rose/rose_link.c
+++ b/net/rose/rose_link.c
@@ -160,7 +160,8 @@ 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 - %3ph\n", skb->data[3],
+ skb->data + 4);
break;
default:
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] rose: use %*ph specifier
2014-09-05 15:32 [PATCH v2] rose: use %*ph specifier Andy Shevchenko
@ 2014-09-05 15:52 ` Eric Dumazet
2014-09-07 23:07 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Eric Dumazet @ 2014-09-05 15:52 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: David S . Miller, linux-hams, netdev
On Fri, 2014-09-05 at 18:32 +0300, 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>
> ---
> - Since v1:
> - compile tested
> - fix a wrong argument list
> net/rose/rose_link.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/rose/rose_link.c b/net/rose/rose_link.c
> index bc55142..e873d7d 100644
> --- a/net/rose/rose_link.c
> +++ b/net/rose/rose_link.c
> @@ -160,7 +160,8 @@ 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 - %3ph\n", skb->data[3],
> + skb->data + 4);
> break;
>
> default:
This looks better ;)
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] rose: use %*ph specifier
2014-09-05 15:32 [PATCH v2] rose: use %*ph specifier Andy Shevchenko
2014-09-05 15:52 ` Eric Dumazet
@ 2014-09-07 23:07 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-09-07 23:07 UTC (permalink / raw)
To: andriy.shevchenko; +Cc: linux-hams, netdev, eric.dumazet
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Fri, 5 Sep 2014 18:32:18 +0300
> Instead of dereference each byte let's use %*ph specifier in the printk()
> calls.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-07 23:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 15:32 [PATCH v2] rose: use %*ph specifier Andy Shevchenko
2014-09-05 15:52 ` Eric Dumazet
2014-09-07 23:07 ` David Miller
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).