summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorAsaf Vertz <asaf.vertz@tandemg.com>2015-01-21 11:06:34 +0200
committerFelipe Balbi <balbi@ti.com>2015-01-27 09:34:59 -0600
commit9fdd84d23c76825f3fc3c0782ea433c52d41971a (patch)
treeebb4e222717c91d05099d9b7f158d4ad1279badc /drivers/usb/gadget
parent5e33f6fdf735cda1d4580fe6f1878da05718fe73 (diff)
downloadlinux-9fdd84d23c76825f3fc3c0782ea433c52d41971a.tar.bz2
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')
-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)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->pattern);
+ result = sprintf(page, "%u", opts->pattern);
mutex_unlock(&opts->lock);
return result;
@@ -1258,7 +1258,7 @@ static ssize_t f_ss_opts_isoc_interval_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->isoc_interval);
+ result = sprintf(page, "%u", opts->isoc_interval);
mutex_unlock(&opts->lock);
return result;
@@ -1302,7 +1302,7 @@ static ssize_t f_ss_opts_isoc_maxpacket_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->isoc_maxpacket);
+ result = sprintf(page, "%u", opts->isoc_maxpacket);
mutex_unlock(&opts->lock);
return result;
@@ -1346,7 +1346,7 @@ static ssize_t f_ss_opts_isoc_mult_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->isoc_mult);
+ result = sprintf(page, "%u", opts->isoc_mult);
mutex_unlock(&opts->lock);
return result;
@@ -1390,7 +1390,7 @@ static ssize_t f_ss_opts_isoc_maxburst_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->isoc_maxburst);
+ result = sprintf(page, "%u", opts->isoc_maxburst);
mutex_unlock(&opts->lock);
return result;
@@ -1434,7 +1434,7 @@ static ssize_t f_ss_opts_bulk_buflen_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->bulk_buflen);
+ result = sprintf(page, "%u", opts->bulk_buflen);
mutex_unlock(&opts->lock);
return result;
@@ -1473,7 +1473,7 @@ static ssize_t f_ss_opts_int_interval_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->int_interval);
+ result = sprintf(page, "%u", opts->int_interval);
mutex_unlock(&opts->lock);
return result;
@@ -1517,7 +1517,7 @@ static ssize_t f_ss_opts_int_maxpacket_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->int_maxpacket);
+ result = sprintf(page, "%u", opts->int_maxpacket);
mutex_unlock(&opts->lock);
return result;
@@ -1561,7 +1561,7 @@ static ssize_t f_ss_opts_int_mult_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->int_mult);
+ result = sprintf(page, "%u", opts->int_mult);
mutex_unlock(&opts->lock);
return result;
@@ -1605,7 +1605,7 @@ static ssize_t f_ss_opts_int_maxburst_show(struct f_ss_opts *opts, char *page)
int result;
mutex_lock(&opts->lock);
- result = sprintf(page, "%d", opts->int_maxburst);
+ result = sprintf(page, "%u", opts->int_maxburst);
mutex_unlock(&opts->lock);
return result;