aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2011-01-12 20:01:11 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:23 -0500
commit264b795fbd055f57b445eb3d58cfc51d6b10b22e (patch)
tree7511840b71b0c5736b9d679f6adac632ecde64ce
parent6f772fe65c7aa1a4679739d885775f07492a6eea (diff)
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>
-rw-r--r--drivers/char/ramoops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c
index eeec5758f9c4..1a9f5f6d6ac5 100644
--- a/drivers/char/ramoops.c
+++ b/drivers/char/ramoops.c
@@ -30,7 +30,7 @@
30 30
31#define RAMOOPS_KERNMSG_HDR "====" 31#define RAMOOPS_KERNMSG_HDR "===="
32 32
33#define RECORD_SIZE 4096 33#define RECORD_SIZE 4096UL
34 34
35static ulong mem_address; 35static ulong mem_address;
36module_param(mem_address, ulong, 0400); 36module_param(mem_address, ulong, 0400);
@@ -77,7 +77,7 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
77 if (reason == KMSG_DUMP_OOPS && !dump_oops) 77 if (reason == KMSG_DUMP_OOPS && !dump_oops)
78 return; 78 return;
79 79
80 buf = (char *)(cxt->virt_addr + (cxt->count * RECORD_SIZE)); 80 buf = cxt->virt_addr + (cxt->count * RECORD_SIZE);
81 buf_orig = buf; 81 buf_orig = buf;
82 82
83 memset(buf, '\0', RECORD_SIZE); 83 memset(buf, '\0', RECORD_SIZE);
@@ -88,8 +88,8 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
88 buf += res; 88 buf += res;
89 89
90 hdr_size = buf - buf_orig; 90 hdr_size = buf - buf_orig;
91 l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - hdr_size)); 91 l2_cpy = min(l2, RECORD_SIZE - hdr_size);
92 l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - hdr_size) - l2_cpy); 92 l1_cpy = min(l1, RECORD_SIZE - hdr_size - l2_cpy);
93 93
94 s2_start = l2 - l2_cpy; 94 s2_start = l2 - l2_cpy;
95 s1_start = l1 - l1_cpy; 95 s1_start = l1 - l1_cpy;