提交 6a587e83 编写于 作者: J Jerome Marchand 提交者: Greg Kroah-Hartman

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: NJerome Marchand <jmarchan@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 67f72bef
...@@ -194,8 +194,7 @@ static void handle_uncompressed_page(struct zram *zram, ...@@ -194,8 +194,7 @@ static void handle_uncompressed_page(struct zram *zram,
unsigned char *user_mem, *cmem; unsigned char *user_mem, *cmem;
user_mem = kmap_atomic(page, KM_USER0); user_mem = kmap_atomic(page, KM_USER0);
cmem = kmap_atomic(zram->table[index].page, KM_USER1) + cmem = kmap_atomic(zram->table[index].page, KM_USER1);
zram->table[index].offset;
memcpy(user_mem, cmem, PAGE_SIZE); memcpy(user_mem, cmem, PAGE_SIZE);
kunmap_atomic(user_mem, KM_USER0); kunmap_atomic(user_mem, KM_USER0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册