Commit 264b795fbd055f57b445eb3d58cfc51d6b10b22e
Committed by
Linus Torvalds
1 parent
6f772fe65c
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
drivers/char/ramoops.c
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | |
31 | 31 | #define RAMOOPS_KERNMSG_HDR "====" |
32 | 32 | |
33 | -#define RECORD_SIZE 4096 | |
33 | +#define RECORD_SIZE 4096UL | |
34 | 34 | |
35 | 35 | static ulong mem_address; |
36 | 36 | module_param(mem_address, ulong, 0400); |
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | if (reason == KMSG_DUMP_OOPS && !dump_oops) |
78 | 78 | return; |
79 | 79 | |
80 | - buf = (char *)(cxt->virt_addr + (cxt->count * RECORD_SIZE)); | |
80 | + buf = cxt->virt_addr + (cxt->count * RECORD_SIZE); | |
81 | 81 | buf_orig = buf; |
82 | 82 | |
83 | 83 | memset(buf, '\0', RECORD_SIZE); |
... | ... | @@ -88,8 +88,8 @@ |
88 | 88 | buf += res; |
89 | 89 | |
90 | 90 | hdr_size = buf - buf_orig; |
91 | - l2_cpy = min(l2, (unsigned long)(RECORD_SIZE - hdr_size)); | |
92 | - l1_cpy = min(l1, (unsigned long)(RECORD_SIZE - hdr_size) - l2_cpy); | |
91 | + l2_cpy = min(l2, RECORD_SIZE - hdr_size); | |
92 | + l1_cpy = min(l1, RECORD_SIZE - hdr_size - l2_cpy); | |
93 | 93 | |
94 | 94 | s2_start = l2 - l2_cpy; |
95 | 95 | s1_start = l1 - l1_cpy; |