Skip to content

Commit

Permalink
Staging: zram: Remove useless offset calculation in handle_uncompress…
Browse files Browse the repository at this point in the history
…ed_page()

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>
  • Loading branch information
Jerome Marchand authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 67f72be commit 6a587e8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/zram/zram_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6a587e8

Please sign in to comment.