From 2f176f79877937082ce052977e552a75e23a73d1 Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Thu, 5 Jul 2007 15:07:35 +0530 Subject: [PATCH] UBI: fix signed-unsigned multiplication There is signed multiplication assigned to unsigned ei.addr in io.c. This causes wrong addresses for big multiplication.This patch solves the problem. Signed-off-by: Brijesh Singh Signed-off-by: Artem Bityutskiy --- drivers/mtd/ubi/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 20e297ad7f..81008ab5d7 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -298,7 +298,7 @@ retry: memset(&ei, 0, sizeof(struct erase_info)); ei.mtd = ubi->mtd; - ei.addr = pnum * ubi->peb_size; + ei.addr = (loff_t)pnum * ubi->peb_size; ei.len = ubi->peb_size; ei.callback = erase_callback; ei.priv = (unsigned long)&wq; -- 2.39.5