All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Norris <computersforpeace@gmail.com>
To: <linux-mtd@lists.infradead.org>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
	Brian Norris <computersforpeace@gmail.com>,
	"Mario J . Rugiero" <mrugiero@gmail.com>
Subject: [PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd'
Date: Mon, 24 Jul 2017 17:05:24 -0700	[thread overview]
Message-ID: <20170725000524.116808-1-computersforpeace@gmail.com> (raw)

This was changed recently (commit e8e3edb95ce6 ("mtd: create per-device
and module-scope debugfs entries")) and some compilers are complaining:

   drivers//mtd/mtdswap.c: In function 'mtdswap_add_debugfs':
>> drivers//mtd/mtdswap.c:1317: warning: unused variable 'dev'

And once we kill 'dev', 'gd' is also unused.

Cc: Mario J. Rugiero <mrugiero@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
 drivers/mtd/mtdswap.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index 6b17932fe557..7d9080e33865 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1313,9 +1313,6 @@ static const struct file_operations mtdswap_fops = {
 
 static int mtdswap_add_debugfs(struct mtdswap_dev *d)
 {
-	struct gendisk *gd = d->mbd_dev->disk;
-	struct device *dev = disk_to_dev(gd);
-
 	struct dentry *root = d->mtd->dbg.dfs_dir;
 	struct dentry *dent;
 
-- 
2.14.0.rc0.284.gd933b75aa4-goog

             reply	other threads:[~2017-07-25  0:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25  0:05 Brian Norris [this message]
2017-07-25 17:03 ` [PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd' Brian Norris

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=20170725000524.116808-1-computersforpeace@gmail.com \
    --to=computersforpeace@gmail.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mrugiero@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.