aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2014-08-06 16:08:29 -0700
committerAlex Shi <alex.shi@linaro.org>2015-05-11 21:09:13 +0800
commit244e41f94febd73d877a397a05e626563ebd2ceb (patch)
tree7825e625767ff7cc72844c5be0dd96abc492cf0b
parent61febc60cc77c7e06ec7d457f21fc9ce9885f7e8 (diff)
downloadlinux-linaro-stable-244e41f94febd73d877a397a05e626563ebd2ceb.tar.gz
zram: use size_t instead of u16
Some architectures (eg, hexagon and PowerPC) could use PAGE_SHIFT of 16 or more. In these cases u16 is not sufficiently large to represent a compressed page's size so use size_t. Signed-off-by: Minchan Kim <minchan@kernel.org> Reported-by: Weijie Yang <weijie.yang@samsung.com> Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Nitin Gupta <ngupta@vflare.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> (cherry picked from commit 023b409f9dac4cdea3322009f2e592068558690c) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/block/zram/zram_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 674b8517694d..efd9e4f1605c 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -336,7 +336,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
unsigned char *cmem;
struct zram_meta *meta = zram->meta;
unsigned long handle;
- u16 size;
+ size_t size;
read_lock(&meta->tb_lock);
handle = meta->table[index].handle;