Netdev List
 help / color / mirror / Atom feed
* [PATCH] USB2NET: SR9800: use %zu for dma_addr_t
@ 2014-02-13  6:31 Jingoo Han
  2014-02-13  6:49 ` Joe Perches
  2014-02-13  7:09 ` [PATCH V2] USB2NET: SR9800: use %zu for size_t Jingoo Han
  0 siblings, 2 replies; 5+ messages in thread
From: Jingoo Han @ 2014-02-13  6:31 UTC (permalink / raw)
  To: 'David Miller'
  Cc: netdev, 'Liu Junliang', 'Jingoo Han'

Use %zu for size_t in order to avoid the following build
warning in printks.

drivers/net/usb/sr9800.c: In function 'sr9800_bind'
drivers/net/usb/sr9800.c:826:2: warning: format '%ld' expects argument of type 'long int' but argument 5 has type 'size_t'
[-Wformat]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/net/usb/sr9800.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c
index 4175eb9..8017108 100644
--- a/drivers/net/usb/sr9800.c
+++ b/drivers/net/usb/sr9800.c
@@ -823,7 +823,7 @@ static int sr9800_bind(struct usbnet *dev, struct usb_interface *intf)
 		dev->rx_urb_size =
 			SR9800_BULKIN_SIZE[SR9800_MAX_BULKIN_2K].size;
 	}
-	netdev_dbg(dev->net, "%s : setting rx_urb_size with : %ld\n", __func__,
+	netdev_dbg(dev->net, "%s : setting rx_urb_size with : %zu\n", __func__,
 		   dev->rx_urb_size);
 	return 0;
 
-- 
1.7.10.4

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

* Re: [PATCH] USB2NET: SR9800: use %zu for dma_addr_t
  2014-02-13  6:31 [PATCH] USB2NET: SR9800: use %zu for dma_addr_t Jingoo Han
@ 2014-02-13  6:49 ` Joe Perches
  2014-02-13  7:07   ` Jingoo Han
  2014-02-13  7:09 ` [PATCH V2] USB2NET: SR9800: use %zu for size_t Jingoo Han
  1 sibling, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-02-13  6:49 UTC (permalink / raw)
  To: Jingoo Han; +Cc: 'David Miller', netdev, 'Liu Junliang'

On Thu, 2014-02-13 at 15:31 +0900, Jingoo Han wrote:
> Use %zu for size_t in order to avoid the following build
> warning in printks.

Perhaps your subject is wrong.

This doesn't seem like a dma_addr_t.

If it is, it should be printed with
"%pad", &dma_addr_t

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

* Re: [PATCH] USB2NET: SR9800: use %zu for dma_addr_t
  2014-02-13  6:49 ` Joe Perches
@ 2014-02-13  7:07   ` Jingoo Han
  0 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2014-02-13  7:07 UTC (permalink / raw)
  To: 'Joe Perches'
  Cc: 'David Miller', netdev, 'Liu Junliang',
	'Jingoo Han'

On Thursday, February 13, 2014 3:49 PM, Joe Perches wrote:
> On Thu, 2014-02-13 at 15:31 +0900, Jingoo Han wrote:
> > Use %zu for size_t in order to avoid the following build
> > warning in printks.
> 
> Perhaps your subject is wrong.
> 
> This doesn't seem like a dma_addr_t.

Oh, it is my mistake! :-(
The subject should be the following.
  [PATCH] USB2NET: SR9800: use %zu for size_t

I will send v2 patch, soon.
Thank you for your comment. :-)

Best regards,
Jingoo Han

> 
> If it is, it should be printed with
> "%pad", &dma_addr_t

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

* [PATCH V2] USB2NET: SR9800: use %zu for size_t
  2014-02-13  6:31 [PATCH] USB2NET: SR9800: use %zu for dma_addr_t Jingoo Han
  2014-02-13  6:49 ` Joe Perches
@ 2014-02-13  7:09 ` Jingoo Han
  2014-02-13 23:47   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-02-13  7:09 UTC (permalink / raw)
  To: 'David Miller'
  Cc: netdev, 'Liu Junliang', 'Joe Perches',
	'Jingoo Han'

Use %zu for size_t in order to avoid the following build
warning in printks.

drivers/net/usb/sr9800.c: In function 'sr9800_bind'
drivers/net/usb/sr9800.c:826:2: warning: format '%ld' expects argument of type 'long int' but argument 5 has type 'size_t'
[-Wformat]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Changes since V1:
- Fix the subject of the commit.

 drivers/net/usb/sr9800.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/usb/sr9800.c b/drivers/net/usb/sr9800.c
index 4175eb9..8017108 100644
--- a/drivers/net/usb/sr9800.c
+++ b/drivers/net/usb/sr9800.c
@@ -823,7 +823,7 @@ static int sr9800_bind(struct usbnet *dev, struct usb_interface *intf)
 		dev->rx_urb_size =
 			SR9800_BULKIN_SIZE[SR9800_MAX_BULKIN_2K].size;
 	}
-	netdev_dbg(dev->net, "%s : setting rx_urb_size with : %ld\n", __func__,
+	netdev_dbg(dev->net, "%s : setting rx_urb_size with : %zu\n", __func__,
 		   dev->rx_urb_size);
 	return 0;
 
-- 
1.7.10.4

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

* Re: [PATCH V2] USB2NET: SR9800: use %zu for size_t
  2014-02-13  7:09 ` [PATCH V2] USB2NET: SR9800: use %zu for size_t Jingoo Han
@ 2014-02-13 23:47   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2014-02-13 23:47 UTC (permalink / raw)
  To: jg1.han; +Cc: netdev, liujunliang_ljl, joe

From: Jingoo Han <jg1.han@samsung.com>
Date: Thu, 13 Feb 2014 16:09:58 +0900

> Use %zu for size_t in order to avoid the following build
> warning in printks.
> 
> drivers/net/usb/sr9800.c: In function 'sr9800_bind'
> drivers/net/usb/sr9800.c:826:2: warning: format '%ld' expects argument of type 'long int' but argument 5 has type 'size_t'
> [-Wformat]
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied, thanks.

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

end of thread, other threads:[~2014-02-13 23:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13  6:31 [PATCH] USB2NET: SR9800: use %zu for dma_addr_t Jingoo Han
2014-02-13  6:49 ` Joe Perches
2014-02-13  7:07   ` Jingoo Han
2014-02-13  7:09 ` [PATCH V2] USB2NET: SR9800: use %zu for size_t Jingoo Han
2014-02-13 23:47   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox