aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authoralex chen <alex.chen@huawei.com>2015-01-16 18:52:03 -0500
committerTony Luck <tony.luck@intel.com>2015-01-16 19:01:29 -0500
commita6b8978c54b771308f6f1692b9735ac0bb087cc2 (patch)
tree002e14ca7c7896bc0a987b0e5f2cf04f4cf37e70 /fs
parent9d5438f462abd6398cdb7b3211bdcec271873a3b (diff)
pstore: Fix sprintf format specifier in pstore_dump()
We should use sprintf format specifier "%u" instead of "%d" for argument of type 'unsigned int' in pstore_dump(). Signed-off-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/pstore/platform.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 15ee78c5020b..c4c9a10c5760 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -301,7 +301,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
301 301
302 if (big_oops_buf) { 302 if (big_oops_buf) {
303 dst = big_oops_buf; 303 dst = big_oops_buf;
304 hsize = sprintf(dst, "%s#%d Part%d\n", why, 304 hsize = sprintf(dst, "%s#%d Part%u\n", why,
305 oopscount, part); 305 oopscount, part);
306 size = big_oops_buf_sz - hsize; 306 size = big_oops_buf_sz - hsize;
307 307
@@ -321,7 +321,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
321 } 321 }
322 } else { 322 } else {
323 dst = psinfo->buf; 323 dst = psinfo->buf;
324 hsize = sprintf(dst, "%s#%d Part%d\n", why, oopscount, 324 hsize = sprintf(dst, "%s#%d Part%u\n", why, oopscount,
325 part); 325 part);
326 size = psinfo->bufsize - hsize; 326 size = psinfo->bufsize - hsize;
327 dst += hsize; 327 dst += hsize;