aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function
diff options
context:
space:
mode:
authorAsaf Vertz <asaf.vertz@tandemg.com>2015-01-21 04:06:34 -0500
committerFelipe Balbi <balbi@ti.com>2015-01-27 10:34:59 -0500
commit9fdd84d23c76825f3fc3c0782ea433c52d41971a (patch)
treeebb4e222717c91d05099d9b7f158d4ad1279badc /drivers/usb/gadget/function
parent5e33f6fdf735cda1d4580fe6f1878da05718fe73 (diff)
usb: gadget: zero: fix format string warnings
Fixed the following warnings (reported by cppcheck): [drivers/usb/gadget/function/f_sourcesink.c:1217]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1261]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1305]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1349]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1393]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1437]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1476]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1520]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1564]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/usb/gadget/function/f_sourcesink.c:1608]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int' Reviewed-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Asaf Vertz <asaf.vertz@tandemg.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function')
-rw-r--r--drivers/usb/gadget/function/f_sourcesink.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index 80be25b32cd7..e07c50ced64d 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -1214,7 +1214,7 @@ static ssize_t f_ss_opts_pattern_show(struct f_ss_opts *opts, char *page)
1214 int result; 1214 int result;
1215 1215
1216 mutex_lock(&opts->lock); 1216 mutex_lock(&opts->lock);
1217 result = sprintf(page, "%d", opts->pattern); 1217 result = sprintf(page, "%u", opts->pattern);
1218 mutex_unlock(&opts->lock); 1218 mutex_unlock(&opts->lock);
1219 1219
1220 return result; 1220 return result;
@@ -1258,7 +1258,7 @@ static ssize_t f_ss_opts_isoc_interval_show(struct f_ss_opts *opts, char *page)
1258 int result; 1258 int result;
1259 1259
1260 mutex_lock(&opts->lock); 1260 mutex_lock(&opts->lock);
1261 result = sprintf(page, "%d", opts->isoc_interval); 1261 result = sprintf(page, "%u", opts->isoc_interval);
1262 mutex_unlock(&opts->lock); 1262 mutex_unlock(&opts->lock);
1263 1263
1264 return result; 1264 return result;
@@ -1302,7 +1302,7 @@ static ssize_t f_ss_opts_isoc_maxpacket_show(struct f_ss_opts *opts, char *page)
1302 int result; 1302 int result;
1303 1303
1304 mutex_lock(&opts->lock); 1304 mutex_lock(&opts->lock);
1305 result = sprintf(page, "%d", opts->isoc_maxpacket); 1305 result = sprintf(page, "%u", opts->isoc_maxpacket);
1306 mutex_unlock(&opts->lock); 1306 mutex_unlock(&opts->lock);
1307 1307
1308 return result; 1308 return result;
@@ -1346,7 +1346,7 @@ static ssize_t f_ss_opts_isoc_mult_show(struct f_ss_opts *opts, char *page)
1346 int result; 1346 int result;
1347 1347
1348 mutex_lock(&opts->lock); 1348 mutex_lock(&opts->lock);
1349 result = sprintf(page, "%d", opts->isoc_mult); 1349 result = sprintf(page, "%u", opts->isoc_mult);
1350 mutex_unlock(&opts->lock); 1350 mutex_unlock(&opts->lock);
1351 1351
1352 return result; 1352 return result;
@@ -1390,7 +1390,7 @@ static ssize_t f_ss_opts_isoc_maxburst_show(struct f_ss_opts *opts, char *page)
1390 int result; 1390 int result;
1391 1391
1392 mutex_lock(&opts->lock); 1392 mutex_lock(&opts->lock);
1393 result = sprintf(page, "%d", opts->isoc_maxburst); 1393 result = sprintf(page, "%u", opts->isoc_maxburst);
1394 mutex_unlock(&opts->lock); 1394 mutex_unlock(&opts->lock);
1395 1395
1396 return result; 1396 return result;
@@ -1434,7 +1434,7 @@ static ssize_t f_ss_opts_bulk_buflen_show(struct f_ss_opts *opts, char *page)
1434 int result; 1434 int result;
1435 1435
1436 mutex_lock(&opts->lock); 1436 mutex_lock(&opts->lock);
1437 result = sprintf(page, "%d", opts->bulk_buflen); 1437 result = sprintf(page, "%u", opts->bulk_buflen);
1438 mutex_unlock(&opts->lock); 1438 mutex_unlock(&opts->lock);
1439 1439
1440 return result; 1440 return result;
@@ -1473,7 +1473,7 @@ static ssize_t f_ss_opts_int_interval_show(struct f_ss_opts *opts, char *page)
1473 int result; 1473 int result;
1474 1474
1475 mutex_lock(&opts->lock); 1475 mutex_lock(&opts->lock);
1476 result = sprintf(page, "%d", opts->int_interval); 1476 result = sprintf(page, "%u", opts->int_interval);
1477 mutex_unlock(&opts->lock); 1477 mutex_unlock(&opts->lock);
1478 1478
1479 return result; 1479 return result;
@@ -1517,7 +1517,7 @@ static ssize_t f_ss_opts_int_maxpacket_show(struct f_ss_opts *opts, char *page)
1517 int result; 1517 int result;
1518 1518
1519 mutex_lock(&opts->lock); 1519 mutex_lock(&opts->lock);
1520 result = sprintf(page, "%d", opts->int_maxpacket); 1520 result = sprintf(page, "%u", opts->int_maxpacket);
1521 mutex_unlock(&opts->lock); 1521 mutex_unlock(&opts->lock);
1522 1522
1523 return result; 1523 return result;
@@ -1561,7 +1561,7 @@ static ssize_t f_ss_opts_int_mult_show(struct f_ss_opts *opts, char *page)
1561 int result; 1561 int result;
1562 1562
1563 mutex_lock(&opts->lock); 1563 mutex_lock(&opts->lock);
1564 result = sprintf(page, "%d", opts->int_mult); 1564 result = sprintf(page, "%u", opts->int_mult);
1565 mutex_unlock(&opts->lock); 1565 mutex_unlock(&opts->lock);
1566 1566
1567 return result; 1567 return result;
@@ -1605,7 +1605,7 @@ static ssize_t f_ss_opts_int_maxburst_show(struct f_ss_opts *opts, char *page)
1605 int result; 1605 int result;
1606 1606
1607 mutex_lock(&opts->lock); 1607 mutex_lock(&opts->lock);
1608 result = sprintf(page, "%d", opts->int_maxburst); 1608 result = sprintf(page, "%u", opts->int_maxburst);
1609 mutex_unlock(&opts->lock); 1609 mutex_unlock(&opts->lock);
1610 1610
1611 return result; 1611 return result;