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-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a587e835e3a8ea2fe9e8fd038553f2090666bd5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.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);