lkml.org 
[lkml]   [2011]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -next] usb/gadget: fix langwell printk formats
From: Randy Dunlap <randy.dunlap@oracle.com>

Fix printk formats to use %zu for size_t args, to fix these
build warnings:

drivers/usb/gadget/langwell_udc.c:3274: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
drivers/usb/gadget/langwell_udc.c:3289: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
drivers/usb/gadget/langwell_udc.c:3473: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
drivers/usb/gadget/langwell_udc.c:3487: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/usb/gadget/langwell_udc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

--- linux-next-20110706.orig/drivers/usb/gadget/langwell_udc.c
+++ linux-next-20110706/drivers/usb/gadget/langwell_udc.c
@@ -3271,7 +3271,7 @@ static int langwell_udc_probe(struct pci

/* allocate device dQH memory */
size = dev->ep_max * sizeof(struct langwell_dqh);
- dev_vdbg(&dev->pdev->dev, "orig size = %d\n", size);
+ dev_vdbg(&dev->pdev->dev, "orig size = %zu\n", size);
if (size < DQH_ALIGNMENT)
size = DQH_ALIGNMENT;
else if ((size % DQH_ALIGNMENT) != 0) {
@@ -3286,7 +3286,7 @@ static int langwell_udc_probe(struct pci
goto error;
}
dev->ep_dqh_size = size;
- dev_vdbg(&dev->pdev->dev, "ep_dqh_size = %d\n", dev->ep_dqh_size);
+ dev_vdbg(&dev->pdev->dev, "ep_dqh_size = %zu\n", dev->ep_dqh_size);

/* initialize ep0 status request structure */
dev->status_req = kzalloc(sizeof(struct langwell_request), GFP_KERNEL);
@@ -3470,7 +3470,7 @@ static int langwell_udc_resume(struct pc

/* allocate device dQH memory */
size = dev->ep_max * sizeof(struct langwell_dqh);
- dev_vdbg(&dev->pdev->dev, "orig size = %d\n", size);
+ dev_vdbg(&dev->pdev->dev, "orig size = %zu\n", size);
if (size < DQH_ALIGNMENT)
size = DQH_ALIGNMENT;
else if ((size % DQH_ALIGNMENT) != 0) {
@@ -3484,7 +3484,7 @@ static int langwell_udc_resume(struct pc
return -ENOMEM;
}
dev->ep_dqh_size = size;
- dev_vdbg(&dev->pdev->dev, "ep_dqh_size = %d\n", dev->ep_dqh_size);
+ dev_vdbg(&dev->pdev->dev, "ep_dqh_size = %zu\n", dev->ep_dqh_size);

/* create dTD dma_pool resource */
dev->dtd_pool = dma_pool_create("langwell_dtd",

\
 
 \ /
  Last update: 2011-07-10 20:45    [W:0.081 / U:8.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site