From: Jerome Marchand <jmarchan@redhat.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
Nitin Gupta <ngupta@vflare.org>,
Robert Jennings <rcj@linux.vnet.ibm.com>,
Jeff Moyer <jmoyer@redhat.com>,
Jerome Marchand <jmarchan@redhat.com>
Subject: [PATCH 1/4] Staging: zram: Remove useless offset calculation in handle_uncompressed_page()
Date: Fri, 10 Jun 2011 15:28:46 +0200 [thread overview]
Message-ID: <1307712529-9757-1-git-send-email-jmarchan@redhat.com> (raw)
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
next reply other threads:[~2011-06-10 13:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 13:28 Jerome Marchand [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1307712529-9757-1-git-send-email-jmarchan@redhat.com \
--to=jmarchan@redhat.com \
--cc=gregkh@suse.de \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=rcj@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®