Skip to content

Commit 310faaa

Browse files
Zhang Yanfeitorvalds
authored andcommitted
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: Zhang 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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e56fb28 commit 310faaa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎kernel/kexec.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ static int kimage_load_normal_segment(struct kimage *image,
786786
struct kexec_segment *segment)
787787
{
788788
unsigned long maddr;
789-
unsigned long ubytes, mbytes;
789+
size_t ubytes, mbytes;
790790
int result;
791791
unsigned char __user *buf;
792792

@@ -850,7 +850,7 @@ static int kimage_load_crash_segment(struct kimage *image,
850850
* We do things a page at a time for the sake of kmap.
851851
*/
852852
unsigned long maddr;
853-
unsigned long ubytes, mbytes;
853+
size_t ubytes, mbytes;
854854
int result;
855855
unsigned char __user *buf;
856856

@@ -1540,7 +1540,7 @@ void vmcoreinfo_append_str(const char *fmt, ...)
15401540
{
15411541
va_list args;
15421542
char buf[0x50];
1543-
int r;
1543+
size_t r;
15441544

15451545
va_start(args, fmt);
15461546
r = vsnprintf(buf, sizeof(buf), fmt, args);

0 commit comments

Comments
 (0)