From: Jerome Marchand Date: Fri, 10 Jun 2011 13:28:46 +0000 (+0200) Subject: Staging: zram: Remove useless offset calculation in handle_uncompressed_page() X-Git-Tag: MMI-PSA29.97-13-9~18845^2~252 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a587e835e3a8ea2fe9e8fd038553f2090666bd5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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);