Commit 83c2099f authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: fix compilation warnings

The recent "UBI: fix NOR flash recovery" introduced compilation
warnings which were immediately spotted by our linux-next keeper.
This patch fixes them.
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent ebf53f42
...@@ -481,16 +481,16 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum) ...@@ -481,16 +481,16 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum)
uint32_t data = 0; uint32_t data = 0;
addr = (loff_t)pnum * ubi->peb_size; addr = (loff_t)pnum * ubi->peb_size;
err = ubi->mtd->write(ubi->mtd, addr, 4, &written, &data); err = ubi->mtd->write(ubi->mtd, addr, 4, &written, (void *)&data);
if (err) { if (err) {
ubi_err("error %d while writing 4 bytes to PEB %d:0, written " ubi_err("error %d while writing 4 bytes to PEB %d:%d, written "
"%zd bytes", err, pnum, 0, written); "%zd bytes", err, pnum, 0, written);
ubi_dbg_dump_stack(); ubi_dbg_dump_stack();
return err; return err;
} }
addr += ubi->vid_hdr_aloffset; addr += ubi->vid_hdr_aloffset;
err = ubi->mtd->write(ubi->mtd, addr, 4, &written, &data); err = ubi->mtd->write(ubi->mtd, addr, 4, &written, (void *)&data);
if (err) { if (err) {
ubi_err("error %d while writing 4 bytes to PEB %d:%d, written " ubi_err("error %d while writing 4 bytes to PEB %d:%d, written "
"%zd bytes", err, pnum, ubi->vid_hdr_aloffset, written); "%zd bytes", err, pnum, ubi->vid_hdr_aloffset, written);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment