ramoops: fix types, remove typecasts
Cc: Ahmed S. Darwish <darwish.07@gmail.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6f772fe65c
commit
264b795fbd
1 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#define RAMOOPS_KERNMSG_HDR "===="
|
#define RAMOOPS_KERNMSG_HDR "===="
|
||||||
|
|
||||||
#define RECORD_SIZE 4096
|
#define RECORD_SIZE 4096UL
|
||||||
|
|
||||||
static ulong mem_address;
|
static ulong mem_address;
|
||||||
module_param(mem_address, ulong, 0400);
|
module_param(mem_address, ulong, 0400);
|
||||||
|
@ -77,7 +77,7 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
|
||||||
if (reason == KMSG_DUMP_OOPS && !dump_oops)
|
if (reason == KMSG_DUMP_OOPS && !dump_oops)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
buf = (char *)(cxt->virt_addr + (cxt->count * RECORD_SIZE));
|
buf = cxt->virt_addr + (cxt->count * RECORD_SIZE);
|
||||||
buf_orig = buf;
|
buf_orig = buf;
|
||||||
|
|
||||||
memset(buf, '\0', RECORD_SIZE);
|
memset(buf, '\0', RECORD_SIZE);
|
||||||
|
@ -88,8 +88,8 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
|
||||||
buf += res;
|
buf += res;
|
||||||
|
|
||||||
hdr_size = buf - buf_orig;
|
hdr_size = buf - buf_orig;
|
||||||
l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - hdr_size));
|
l2_cpy = min(l2, RECORD_SIZE - hdr_size);
|
||||||
l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - hdr_size) - l2_cpy);
|
l1_cpy = min(l1, RECORD_SIZE - hdr_size - l2_cpy);
|
||||||
|
|
||||||
s2_start = l2 - l2_cpy;
|
s2_start = l2 - l2_cpy;
|
||||||
s1_start = l1 - l1_cpy;
|
s1_start = l1 - l1_cpy;
|
||||||
|
|
Loading…
Add table
Reference in a new issue