Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 023b409f authored by Minchan Kim's avatar Minchan Kim Committed by Linus Torvalds
Browse files

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: default avatarMinchan Kim <minchan@kernel.org>
Reported-by: default avatarWeijie Yang <weijie.yang@samsung.com>
Acked-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a830eff7
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -337,7 +337,7 @@ static int zram_decompress_page(struct zram *zram, char *mem, u32 index)
	unsigned char *cmem;
	unsigned char *cmem;
	struct zram_meta *meta = zram->meta;
	struct zram_meta *meta = zram->meta;
	unsigned long handle;
	unsigned long handle;
	u16 size;
	size_t size;


	read_lock(&meta->tb_lock);
	read_lock(&meta->tb_lock);
	handle = meta->table[index].handle;
	handle = meta->table[index].handle;