Commit 310faaa9 authored by Zhang Yanfei's avatar Zhang Yanfei Committed by Linus Torvalds

kexec: fix wrong types of some local variables

The types of the following local variables:

- ubytes/mbytes in kimage_load_crash_segment()/kimage_load_normal_segment()

- r in vmcoreinfo_append_str()

are wrong, so fix them.
Signed-off-by: default avatarZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Simon Horman <horms@verge.net.au>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e56fb287
...@@ -786,7 +786,7 @@ static int kimage_load_normal_segment(struct kimage *image, ...@@ -786,7 +786,7 @@ static int kimage_load_normal_segment(struct kimage *image,
struct kexec_segment *segment) struct kexec_segment *segment)
{ {
unsigned long maddr; unsigned long maddr;
unsigned long ubytes, mbytes; size_t ubytes, mbytes;
int result; int result;
unsigned char __user *buf; unsigned char __user *buf;
...@@ -850,7 +850,7 @@ static int kimage_load_crash_segment(struct kimage *image, ...@@ -850,7 +850,7 @@ static int kimage_load_crash_segment(struct kimage *image,
* We do things a page at a time for the sake of kmap. * We do things a page at a time for the sake of kmap.
*/ */
unsigned long maddr; unsigned long maddr;
unsigned long ubytes, mbytes; size_t ubytes, mbytes;
int result; int result;
unsigned char __user *buf; unsigned char __user *buf;
...@@ -1540,7 +1540,7 @@ void vmcoreinfo_append_str(const char *fmt, ...) ...@@ -1540,7 +1540,7 @@ void vmcoreinfo_append_str(const char *fmt, ...)
{ {
va_list args; va_list args;
char buf[0x50]; char buf[0x50];
int r; size_t r;
va_start(args, fmt); va_start(args, fmt);
r = vsnprintf(buf, sizeof(buf), fmt, args); r = vsnprintf(buf, sizeof(buf), fmt, args);
......
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