[PATCH] [MTD] block2mtd: remove casts
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>
This commit is contained in:
parent
1ca9492992
commit
0ffb74ccc0
1 changed files with 2 additions and 2 deletions
|
@ -111,8 +111,8 @@ static int _block2mtd_erase(struct block2mtd_dev *dev, loff_t to, size_t len)
|
||||||
if (IS_ERR(page))
|
if (IS_ERR(page))
|
||||||
return PTR_ERR(page);
|
return PTR_ERR(page);
|
||||||
|
|
||||||
max = (u_long*)page_address(page) + PAGE_SIZE;
|
max = page_address(page) + PAGE_SIZE;
|
||||||
for (p=(u_long*)page_address(page); p<max; p++)
|
for (p=page_address(page); p<max; p++)
|
||||||
if (*p != -1UL) {
|
if (*p != -1UL) {
|
||||||
lock_page(page);
|
lock_page(page);
|
||||||
memset(page_address(page), 0xff, PAGE_SIZE);
|
memset(page_address(page), 0xff, PAGE_SIZE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue