projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ca9492
)
[PATCH] [MTD] block2mtd: remove casts
author
Joern Engel
<joern@wh.fh-wedel.de>
Tue, 20 Feb 2007 19:20:58 +0000
(20:20 +0100)
committer
Joern Engel
<joern@wh.fh-wedel.de>
Tue, 20 Feb 2007 19:20:58 +0000
(20:20 +0100)
Remove two casts - they were not only pointless, but outright harmful.
Spotted by Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Jörn Engel <joern@lazybastard.org>
drivers/mtd/devices/block2mtd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/mtd/devices/block2mtd.c
b/drivers/mtd/devices/block2mtd.c
index f9f2ce7806b0b3edc21a5d6763736f56329a4ee8..6a9fb80339fb6565ccba3b5ee42f7b97be190b91 100644
(file)
--- a/
drivers/mtd/devices/block2mtd.c
+++ b/
drivers/mtd/devices/block2mtd.c
@@
-111,8
+111,8
@@
static int _block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len)
if (IS_ERR(page))
return PTR_ERR(page);
- max =
(u_long*)
page_address(page) + PAGE_SIZE;
- for (p=
(u_long*)
page_address(page); p<max; p++)
+ max = page_address(page) + PAGE_SIZE;
+ for (p=page_address(page); p<max; p++)
if (*p != -1UL) {
lock_page(page);
memset(page_address(page), 0xff, PAGE_SIZE);