linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: via: via-rhine: use %p to format void * address instead of %x
@ 2017-11-29 14:11 Colin King
  2017-11-29 14:58 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-29 14:11 UTC (permalink / raw)
  To: David S . Miller, netdev; +Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Don't use %x and casting to print out an address, instead use %p
and remove the casting.  Cleans up smatch warnings:

drivers/net/ethernet/via/via-rhine.c:998 rhine_init_one_common()
warn: argument 4 to %lx specifier is cast from pointer

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/via/via-rhine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index 83e6f76eb965..33949248c829 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -995,8 +995,8 @@ static int rhine_init_one_common(struct device *hwdev, u32 quirks,
 	else
 		name = "Rhine III";
 
-	netdev_info(dev, "VIA %s at 0x%lx, %pM, IRQ %d\n",
-		    name, (long)ioaddr, dev->dev_addr, rp->irq);
+	netdev_info(dev, "VIA %s at %p, %pM, IRQ %d\n",
+		    name, ioaddr, dev->dev_addr, rp->irq);
 
 	dev_set_drvdata(hwdev, dev);
 
-- 
2.14.1

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

* Re: [PATCH] net: via: via-rhine: use %p to format void * address instead of %x
  2017-11-29 14:11 [PATCH] net: via: via-rhine: use %p to format void * address instead of %x Colin King
@ 2017-11-29 14:58 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-29 14:58 UTC (permalink / raw)
  To: colin.king; +Cc: netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Wed, 29 Nov 2017 14:11:49 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> Don't use %x and casting to print out an address, instead use %p
> and remove the casting.  Cleans up smatch warnings:
> 
> drivers/net/ethernet/via/via-rhine.c:998 rhine_init_one_common()
> warn: argument 4 to %lx specifier is cast from pointer
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2017-11-29 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 14:11 [PATCH] net: via: via-rhine: use %p to format void * address instead of %x Colin King
2017-11-29 14:58 ` 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).