From 6a587e835e3a8ea2fe9e8fd038553f2090666bd5 Mon Sep 17 00:00:00 2001 From: Jerome Marchand Date: Fri, 10 Jun 2011 15:28:46 +0200 Subject: [PATCH] Staging: zram: Remove useless offset calculation in handle_uncompressed_page() The offset of uncompressed page is always zero: handle_uncompressed_page() doesn't have to care about it. Signed-off-by: Jerome Marchand Signed-off-by: Greg Kroah-Hartman --- drivers/staging/zram/zram_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index aab4ec482124..3305e1a4dc1c 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@ -194,8 +194,7 @@ static void handle_uncompressed_page(struct zram *zram, unsigned char *user_mem, *cmem; user_mem = kmap_atomic(page, KM_USER0); - cmem = kmap_atomic(zram->table[index].page, KM_USER1) + - zram->table[index].offset; + cmem = kmap_atomic(zram->table[index].page, KM_USER1); memcpy(user_mem, cmem, PAGE_SIZE); kunmap_atomic(user_mem, KM_USER0); -- 2.20.1