LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v1 1/1] ray_cs: use %*ph to print small buffer
@ 2021-07-12 14:29 Andy Shevchenko
  2021-08-21 17:14 ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2021-07-12 14:29 UTC (permalink / raw)
  To: Andy Shevchenko, linux-wireless, netdev, linux-kernel
  Cc: Kalle Valo, David S. Miller, Jakub Kicinski

Use %*ph format to print small buffer as hex string.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/wireless/ray_cs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 590bd974d94f..de614ac60421 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2424,9 +2424,7 @@ static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs,
 	copy_from_rx_buff(local, buff, pkt_addr, rx_len & 0xff);
 	/* if we are trying to get authenticated */
 	if (local->sparm.b4.a_network_type == ADHOC) {
-		pr_debug("ray_cs rx_auth var= %02x %02x %02x %02x %02x %02x\n",
-		      msg->var[0], msg->var[1], msg->var[2], msg->var[3],
-		      msg->var[4], msg->var[5]);
+		pr_debug("ray_cs rx_auth var= %6ph\n", msg->var);
 		if (msg->var[2] == 1) {
 			pr_debug("ray_cs Sending authentication response.\n");
 			if (!build_auth_frame
-- 
2.30.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] ray_cs: use %*ph to print small buffer
  2021-07-12 14:29 [PATCH v1 1/1] ray_cs: use %*ph to print small buffer Andy Shevchenko
@ 2021-08-21 17:14 ` Kalle Valo
  2021-08-21 19:38   ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2021-08-21 17:14 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Andy Shevchenko, linux-wireless, netdev, linux-kernel,
	David S. Miller, Jakub Kicinski

Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> Use %*ph format to print small buffer as hex string.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Patch applied to wireless-drivers-next.git, thanks.

502213fd8fca ray_cs: use %*ph to print small buffer

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210712142943.23981-1-andriy.shevchenko@linux.intel.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] ray_cs: use %*ph to print small buffer
  2021-08-21 17:14 ` Kalle Valo
@ 2021-08-21 19:38   ` Joe Perches
  2021-08-22  5:08     ` Kalle Valo
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2021-08-21 19:38 UTC (permalink / raw)
  To: Kalle Valo, Andy Shevchenko
  Cc: linux-wireless, netdev, linux-kernel, David S. Miller, Jakub Kicinski

On Sat, 2021-08-21 at 17:14 +0000, Kalle Valo wrote:
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > Use %*ph format to print small buffer as hex string.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Patch applied to wireless-drivers-next.git, thanks.
> 
> 502213fd8fca ray_cs: use %*ph to print small buffer
> 

There's one more of these in the same file but it's in an #ifdef 0 block...
---
 drivers/net/wireless/ray_cs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 590bd974d94f4..849216fbb8363 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -2284,9 +2284,9 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
 			       DUMP_PREFIX_NONE, 16, 1,
 			       skb->data, 64, true);
 		printk(KERN_DEBUG
-		       "type = %08x, xsap = %02x%02x%02x, org = %02x02x02x\n",
+		       "type = %08x, xsap = %02x%02x%02x, org = %3phN\n",
 		       ntohs(type), psnap->dsap, psnap->ssap, psnap->ctrl,
-		       psnap->org[0], psnap->org[1], psnap->org[2]);
+		       psnap->org);
 		printk(KERN_DEBUG "untranslate skb->data = %p\n", skb->data);
 	}
 #endif



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] ray_cs: use %*ph to print small buffer
  2021-08-21 19:38   ` Joe Perches
@ 2021-08-22  5:08     ` Kalle Valo
  2021-08-22  7:14       ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2021-08-22  5:08 UTC (permalink / raw)
  To: Joe Perches
  Cc: Andy Shevchenko, linux-wireless, netdev, linux-kernel,
	David S. Miller, Jakub Kicinski

Joe Perches <joe@perches.com> writes:

> On Sat, 2021-08-21 at 17:14 +0000, Kalle Valo wrote:
>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>> 
>> > Use %*ph format to print small buffer as hex string.
>> > 
>> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>> 
>> Patch applied to wireless-drivers-next.git, thanks.
>> 
>> 502213fd8fca ray_cs: use %*ph to print small buffer
>> 
>
> There's one more of these in the same file but it's in an #ifdef 0 block...

I would rather remove the whole ifdef 0 block, patches welcome.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v1 1/1] ray_cs: use %*ph to print small buffer
  2021-08-22  5:08     ` Kalle Valo
@ 2021-08-22  7:14       ` Joe Perches
  0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2021-08-22  7:14 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Andy Shevchenko, linux-wireless, netdev, linux-kernel,
	David S. Miller, Jakub Kicinski

On Sun, 2021-08-22 at 08:08 +0300, Kalle Valo wrote:
> Joe Perches <joe@perches.com> writes:
> 
> > On Sat, 2021-08-21 at 17:14 +0000, Kalle Valo wrote:
> > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> > > 
> > > > Use %*ph format to print small buffer as hex string.
> > > > 
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > 
> > > Patch applied to wireless-drivers-next.git, thanks.
> > > 
> > > 502213fd8fca ray_cs: use %*ph to print small buffer
> > > 
> > 
> > There's one more of these in the same file but it's in an #ifdef 0 block...
> 
> I would rather remove the whole ifdef 0 block, patches welcome.
> 

It'd probably take you about 20 seconds if you do it yourself.

$ git grep -P -n '^\s*#\s*if\s+0\b' drivers/net/wireless/ray_cs.c
drivers/net/wireless/ray_cs.c:637:#if 0
drivers/net/wireless/ray_cs.c:2281:#if 0
drivers/net/wireless/ray_cs.c:2341:#if 0

Rather a bit more time if you want to do the whole kernel...

$ git grep -P -n '^\s*#\s*if\s+0\b' | wc -l
1558




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-22  7:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 14:29 [PATCH v1 1/1] ray_cs: use %*ph to print small buffer Andy Shevchenko
2021-08-21 17:14 ` Kalle Valo
2021-08-21 19:38   ` Joe Perches
2021-08-22  5:08     ` Kalle Valo
2021-08-22  7:14       ` Joe Perches

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).