Skip to contentSkip to conversation

usb: lthor: Specify correct parameter for sizeof type

PATCH New Michal Simek 2 participants 2 messages Oct 30, 2015 – Nov 3, 2015 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: lthor: Specify correct parameter for sizeof type

This patch removes this warning:
CC drivers/usb/gadget/f_thor.o
drivers/usb/gadget/f_thor.c: In function ?thor_tx_data?:
drivers/usb/gadget/f_thor.c:572:2: warning: format ?%d? expects argument of type ?int?, but argument 4 has type ?long unsigned int? [-Wformat=]
debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__, ^

---

 drivers/usb/gadget/f_thor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/f_thor.c +1 -1
index ff1481ba3723..9ed0ce3d3132 100644
@@ -569,7 +569,7 @@ static void thor_tx_data(unsigned char *data, int len)
 
 	dev->in_req->length = len;
 
-	debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__,
+	debug("%s: dev->in_req->length:%d to_cpy:%zd\n", __func__,
 	      dev->in_req->length, sizeof(data));
 
 	status = usb_ep_queue(dev->in_ep, dev->in_req, 0);
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/1 usb: lthor: Specify correct parameter for sizeof type

Hi Michal,

Quoted 19 lines

This patch removes this warning:
CC drivers/usb/gadget/f_thor.o
drivers/usb/gadget/f_thor.c: In function ?thor_tx_data?:
drivers/usb/gadget/f_thor.c:572:2: warning: format ?%d? expects argument of type ?int?, but argument 4 has type ?long unsigned int? [-Wformat=] debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__, ^

---

 drivers/usb/gadget/f_thor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/f_thor.c +0 -0
index ff1481ba3723..9ed0ce3d3132 100644

drivers/usb/gadget/f_thor.c static void thor_tx_data(unsigned char *data, int · line 575

Quoted 8 lines
drivers/usb/gadget/f_thor.c +1 -1
@@ -569,7 +569,7 @@ static void thor_tx_data(unsigned char *data, int
 len) 
 	dev->in_req->length = len;
 
-	debug("%s: dev->in_req->length:%d to_cpy:%d\n", __func__,
+	debug("%s: dev->in_req->length:%d to_cpy:%zd\n", __func__,
 	      dev->in_req->length, sizeof(data));
 
 	status = usb_ep_queue(dev->in_ep, dev->in_req, 0);
Signature · 5 lines
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group