Skip to content

Commit

Permalink
ramoops: fix types, remove typecasts
Browse files Browse the repository at this point in the history
Cc: Ahmed S. Darwish <[email protected]>
Cc: Kyungmin Park <[email protected]>
Cc: Marco Stornelli <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Jan 13, 2011
1 parent 6f772fe commit 264b795
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/char/ramoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#define RAMOOPS_KERNMSG_HDR "===="

#define RECORD_SIZE 4096
#define RECORD_SIZE 4096UL

static ulong mem_address;
module_param(mem_address, ulong, 0400);
Expand Down Expand Up @@ -77,7 +77,7 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
if (reason == KMSG_DUMP_OOPS && !dump_oops)
return;

buf = (char *)(cxt->virt_addr + (cxt->count * RECORD_SIZE));
buf = cxt->virt_addr + (cxt->count * RECORD_SIZE);
buf_orig = buf;

memset(buf, '\0', RECORD_SIZE);
Expand All @@ -88,8 +88,8 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
buf += res;

hdr_size = buf - buf_orig;
l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - hdr_size));
l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - hdr_size) - l2_cpy);
l2_cpy = min(l2, RECORD_SIZE - hdr_size);
l1_cpy = min(l1, RECORD_SIZE - hdr_size - l2_cpy);

s2_start = l2 - l2_cpy;
s1_start = l1 - l1_cpy;
Expand Down

0 comments on commit 264b795

Please sign in to comment.