public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] Staging: zram: Remove useless offset calculation in handle_uncompressed_page()
@ 2011-06-10 13:28 Jerome Marchand
  2011-06-10 13:28 ` [PATCH 2/4] Staging: zram: Refactor zram_read/write() functions Jerome Marchand
  2011-06-10 16:38 ` [PATCH 1/4] Staging: zram: Remove useless offset calculation in handle_uncompressed_page() Nitin Gupta
  0 siblings, 2 replies; 14+ messages in thread
From: Jerome Marchand @ 2011-06-10 13:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Linux Kernel List, Nitin Gupta, Robert Jennings, Jeff Moyer,
	Jerome Marchand

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>
---
 drivers/staging/zram/zram_drv.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index aab4ec4..3305e1a 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);
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-07-14  3:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-10 13:28 [PATCH 1/4] Staging: zram: Remove useless offset calculation in handle_uncompressed_page() Jerome Marchand
2011-06-10 13:28 ` [PATCH 2/4] Staging: zram: Refactor zram_read/write() functions Jerome Marchand
2011-06-10 13:28   ` [PATCH 3/4] Staging: zram: allow partial page operations Jerome Marchand
2011-06-10 13:28     ` [PATCH 4/4] Staging: zram: Replace mutex lock by a R/W semaphore Jerome Marchand
2011-06-10 16:46       ` Nitin Gupta
2011-06-10 16:41     ` [PATCH 3/4] Staging: zram: allow partial page operations Nitin Gupta
2011-06-13  9:42       ` Jerome Marchand
2011-06-14 14:49         ` Jeff Moyer
2011-06-14 16:36           ` Martin K. Petersen
2011-07-01  9:47       ` Jerome Marchand
2011-07-14  3:19         ` Nitin Gupta
2011-07-14  3:25     ` Nitin Gupta
2011-07-14  3:24   ` [PATCH 2/4] Staging: zram: Refactor zram_read/write() functions Nitin Gupta
2011-06-10 16:38 ` [PATCH 1/4] Staging: zram: Remove useless offset calculation in handle_uncompressed_page() Nitin Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox