Commit b9af9ea4 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: langwell_udc: fix compile warnings

This patch fixes the following compile warnings:

drivers/usb/gadget/langwell_udc.c: In function ‘queue_dtd’:
drivers/usb/gadget/langwell_udc.c:596:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
drivers/usb/gadget/langwell_udc.c: In function ‘langwell_udc_probe’:
drivers/usb/gadget/langwell_udc.c:3274:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat]
drivers/usb/gadget/langwell_udc.c:3289:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat]
drivers/usb/gadget/langwell_udc.c: In function ‘langwell_udc_resume’:
drivers/usb/gadget/langwell_udc.c:3473:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat]
drivers/usb/gadget/langwell_udc.c:3487:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Wformat]
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 4dbafd3d
...@@ -593,8 +593,8 @@ static int queue_dtd(struct langwell_ep *ep, struct langwell_request *req) ...@@ -593,8 +593,8 @@ static int queue_dtd(struct langwell_ep *ep, struct langwell_request *req)
/* ep0 */ /* ep0 */
dev_vdbg(&dev->pdev->dev, "%s-%s\n", ep->name, DIR_STRING(ep)); dev_vdbg(&dev->pdev->dev, "%s-%s\n", ep->name, DIR_STRING(ep));
dev_vdbg(&dev->pdev->dev, "ep_dqh[%d] addr: 0x%08x\n", dev_vdbg(&dev->pdev->dev, "ep_dqh[%d] addr: 0x%p\n",
i, (u32)&(dev->ep_dqh[i])); i, &(dev->ep_dqh[i]));
bit_mask = is_in(ep) ? bit_mask = is_in(ep) ?
(1 << (ep->ep_num + 16)) : (1 << (ep->ep_num)); (1 << (ep->ep_num + 16)) : (1 << (ep->ep_num));
...@@ -3271,7 +3271,7 @@ static int langwell_udc_probe(struct pci_dev *pdev, ...@@ -3271,7 +3271,7 @@ static int langwell_udc_probe(struct pci_dev *pdev,
/* allocate device dQH memory */ /* allocate device dQH memory */
size = dev->ep_max * sizeof(struct langwell_dqh); 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 = %zd\n", size);
if (size < DQH_ALIGNMENT) if (size < DQH_ALIGNMENT)
size = DQH_ALIGNMENT; size = DQH_ALIGNMENT;
else if ((size % DQH_ALIGNMENT) != 0) { else if ((size % DQH_ALIGNMENT) != 0) {
...@@ -3286,7 +3286,7 @@ static int langwell_udc_probe(struct pci_dev *pdev, ...@@ -3286,7 +3286,7 @@ static int langwell_udc_probe(struct pci_dev *pdev,
goto error; goto error;
} }
dev->ep_dqh_size = size; 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 = %zd\n", dev->ep_dqh_size);
/* initialize ep0 status request structure */ /* initialize ep0 status request structure */
dev->status_req = kzalloc(sizeof(struct langwell_request), GFP_KERNEL); dev->status_req = kzalloc(sizeof(struct langwell_request), GFP_KERNEL);
...@@ -3470,7 +3470,7 @@ static int langwell_udc_resume(struct pci_dev *pdev) ...@@ -3470,7 +3470,7 @@ static int langwell_udc_resume(struct pci_dev *pdev)
/* allocate device dQH memory */ /* allocate device dQH memory */
size = dev->ep_max * sizeof(struct langwell_dqh); 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 = %zd\n", size);
if (size < DQH_ALIGNMENT) if (size < DQH_ALIGNMENT)
size = DQH_ALIGNMENT; size = DQH_ALIGNMENT;
else if ((size % DQH_ALIGNMENT) != 0) { else if ((size % DQH_ALIGNMENT) != 0) {
...@@ -3484,7 +3484,7 @@ static int langwell_udc_resume(struct pci_dev *pdev) ...@@ -3484,7 +3484,7 @@ static int langwell_udc_resume(struct pci_dev *pdev)
return -ENOMEM; return -ENOMEM;
} }
dev->ep_dqh_size = size; 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 = %zd\n", dev->ep_dqh_size);
/* create dTD dma_pool resource */ /* create dTD dma_pool resource */
dev->dtd_pool = dma_pool_create("langwell_dtd", dev->dtd_pool = dma_pool_create("langwell_dtd",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment