kernel: backport the ubiblock patches from 3.14->3.10
[openwrt/openwrt.git] / target / linux / generic / patches-3.10 / 043-UBI-block-Use-u64-for-the-64-bit-dividend.patch
1 From 9981e14ab2f7c6a4d2bb45e51a6371964919837d Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Mon, 3 Mar 2014 13:42:39 -0300
4 Subject: [PATCH] UBI: block: Use 'u64' for the 64-bit dividend
5
6 Fixes the following warning on ARCH=avr32:
7
8 drivers/mtd/ubi/block.c: In function 'ubiblock_read':
9 drivers/mtd/ubi/block.c:207: warning: comparison of distinct pointer types lacks a cast
10
11 Reported-by: kbuild test robot <fengguang.wu@intel.com>
12 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
13 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
14 ---
15 drivers/mtd/ubi/block.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 diff --git a/drivers/mtd/ubi/block.c b/drivers/mtd/ubi/block.c
19 index cd6be98..16e6731 100644
20 --- a/drivers/mtd/ubi/block.c
21 +++ b/drivers/mtd/ubi/block.c
22 @@ -201,7 +201,7 @@ static int ubiblock_read(struct ubiblock *dev, char *buffer,
23 int ret, leb, offset;
24 int bytes_left = len;
25 int to_read = len;
26 - loff_t pos = sec << 9;
27 + u64 pos = sec << 9;
28
29 /* Get LEB:offset address to read from */
30 offset = do_div(pos, dev->leb_size);
31 --
32 1.9.2
33