Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1695869 > unrolled thread

[PATCH] mtd: remove unused variable in mtdswap

Started byArnd Bergmann <arnd@arndb.de>
First post2017-07-25 17:50 +0200
Last post2017-07-25 19:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] mtd: remove unused variable in mtdswap Arnd Bergmann <arnd@arndb.de> - 2017-07-25 17:50 +0200
    Re: [PATCH] mtd: remove unused variable in mtdswap Brian Norris <computersforpeace@gmail.com> - 2017-07-25 19:10 +0200

#1695869 — [PATCH] mtd: remove unused variable in mtdswap

FromArnd Bergmann <arnd@arndb.de>
Date2017-07-25 17:50 +0200
Subject[PATCH] mtd: remove unused variable in mtdswap
Message-ID<u7afU-4DI-15@gated-at.bofh.it>
The only user of this variable was removed, leading to a
new harmless warning:

drivers/mtd/mtdswap.c: In function 'mtdswap_add_debugfs':
drivers/mtd/mtdswap.c:1317:17: error: unused variable 'dev' [-Werror=unused-variable]

This removes the variable as well.

Fixes: e8e3edb95ce6 ("mtd: create per-device and module-scope debugfs entries")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 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.9.0

[toc] | [next] | [standalone]


#1695950

FromBrian Norris <computersforpeace@gmail.com>
Date2017-07-25 19:10 +0200
Message-ID<u7bvj-5B8-1@gated-at.bofh.it>
In reply to#1695869
On Tue, Jul 25, 2017 at 05:41:58PM +0200, Arnd Bergmann wrote:
> The only user of this variable was removed, leading to a
> new harmless warning:
> 
> drivers/mtd/mtdswap.c: In function 'mtdswap_add_debugfs':
> drivers/mtd/mtdswap.c:1317:17: error: unused variable 'dev' [-Werror=unused-variable]
> 
> This removes the variable as well.
> 
> Fixes: e8e3edb95ce6 ("mtd: create per-device and module-scope debugfs entries")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

I beat you to it:

https://patchwork.ozlabs.org/patch/793136/
[PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd'

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web