Staging: zram: Remove useless offset calculation in handle_uncompressed_page()
authorJerome Marchand <jmarchan@redhat.com>
Fri, 10 Jun 2011 13:28:46 +0000 (15:28 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Jul 2011 17:07:13 +0000 (10:07 -0700)
The offset of uncompressed page is always zero: handle_uncompressed_page()
doesn't have to care about it.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zram/zram_drv.c

index aab4ec4..3305e1a 100644 (file)
@@ -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);