projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a830eff
)
zram: use size_t instead of u16
author
Minchan Kim
<
[email protected]
>
Wed, 6 Aug 2014 23:08:29 +0000
(16:08 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 7 Aug 2014 01:01:23 +0000
(18:01 -0700)
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 <
[email protected]
>
Reported-by: Weijie Yang <
[email protected]
>
Acked-by: Sergey Senozhatsky <
[email protected]
>
Cc: Jerome Marchand <
[email protected]
>
Cc: Nitin Gupta <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/block/zram/zram_drv.c
patch
|
blob
|
history
diff --git
a/drivers/block/zram/zram_drv.c
b/drivers/block/zram/zram_drv.c
index 36e54be402df30b68c579e09c588193f5f015e00..40743972eaf7d4d038fe72c0ed12f45caeace023 100644
(file)
--- 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)
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;