mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
To: gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	linux-mm-cc@laptop.org, ngupta@vflare.org,
	Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Subject: [PATCH 1/2] staging: zram: Remove some dead code
Date: Thu, 21 Jun 2012 00:32:44 -0300	[thread overview]
Message-ID: <1340249565-29404-2-git-send-email-marcos.souza.org@gmail.com> (raw)
In-Reply-To: <1340249565-29404-1-git-send-email-marcos.souza.org@gmail.com>

This patch removes code that is never executed by zram.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
---
 drivers/staging/zram/zram_drv.c |    9 ---------
 drivers/staging/zram/zram_drv.h |    3 ---
 2 files changed, 12 deletions(-)

diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index 685d612..5216ee1 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -415,15 +415,6 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
 	cmem = zs_map_object(zram->mem_pool, handle);
 
 memstore:
-#if 0
-	/* Back-reference needed for memory defragmentation */
-	if (!zram_test_flag(zram, index, ZRAM_UNCOMPRESSED)) {
-		zheader = (struct zobj_header *)cmem;
-		zheader->table_idx = index;
-		cmem += sizeof(*zheader);
-	}
-#endif
-
 	memcpy(cmem, src, clen);
 
 	if (unlikely(zram_test_flag(zram, index, ZRAM_UNCOMPRESSED))) {
diff --git a/drivers/staging/zram/zram_drv.h b/drivers/staging/zram/zram_drv.h
index fbe8ac9..fe3f8fe 100644
--- a/drivers/staging/zram/zram_drv.h
+++ b/drivers/staging/zram/zram_drv.h
@@ -33,9 +33,6 @@ static const unsigned max_num_devices = 32;
  * object. This is required to support memory defragmentation.
  */
 struct zobj_header {
-#if 0
-	u32 table_idx;
-#endif
 };
 
 /*-- Configurable parameters */
-- 
1.7.10.2


  reply	other threads:[~2012-06-21  3:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21  3:32 [PATCH 0/2] ZRAM Cleanup Marcos Paulo de Souza
2012-06-21  3:32 ` Marcos Paulo de Souza [this message]
2012-06-21  3:32 ` [PATCH 2/2] staging: zram: Remove useless struct zobj_header Marcos Paulo de Souza
2012-06-23 15:18   ` Dan Carpenter
2012-06-21  5:02 ` [PATCH 0/2] ZRAM Cleanup Minchan Kim

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=1340249565-29404-2-git-send-email-marcos.souza.org@gmail.com \
    --to=marcos.souza.org@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm-cc@laptop.org \
    --cc=ngupta@vflare.org \
    /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®