aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/zram
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2014-08-06 19:08:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:23 -0400
commit023b409f9dac4cdea3322009f2e592068558690c (patch)
tree832d33ccc7ae54719678c7723ea4100b8efab7b7 /drivers/block/zram
parenta830eff749eb2bf906783f6bf74a74dad3de3aea (diff)
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>
Diffstat (limited to 'drivers/block/zram')
-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 36e54be402df..40743972eaf7 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -337,7 +337,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
337 unsigned char *cmem; 337 unsigned char *cmem;
338 struct zram_meta *meta = zram->meta; 338 struct zram_meta *meta = zram->meta;
339 unsigned long handle; 339 unsigned long handle;
340 u16 size; 340 size_t size;
341 341
342 read_lock(&meta->tb_lock); 342 read_lock(&meta->tb_lock);
343 handle = meta->table[index].handle; 343 handle = meta->table[index].handle;