linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] zram: use size_t instead of u16
@ 2014-06-30  2:54 Minchan Kim
  2014-06-30  2:54 ` [PATCH 2/2] zram: remove global tb_lock with fine grain lock Minchan Kim
  2014-06-30  9:46 ` [PATCH 1/2] zram: use size_t instead of u16 Sergey Senozhatsky
  0 siblings, 2 replies; 3+ messages in thread
From: Minchan Kim @ 2014-06-30  2:54 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, Sergey Senozhatsky, Weijie Yang, Jerome Marchand,
	Nitin Gupta, Minchan Kim

Some of arch(ex, hexagon and PowerPC) could use PAGE_SHIFT
as 16 above. In the case, u16 is is lack of representing
compressed page's size so use size_t.

Reported-by: Weijie Yang <weijie.yang@samsung.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
 drivers/block/zram/zram_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 089e72cd37be..3233bccd6361 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)
 	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;
-- 
2.0.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-30  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30  2:54 [PATCH 1/2] zram: use size_t instead of u16 Minchan Kim
2014-06-30  2:54 ` [PATCH 2/2] zram: remove global tb_lock with fine grain lock Minchan Kim
2014-06-30  9:46 ` [PATCH 1/2] zram: use size_t instead of u16 Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).