* [PATCH] mtd: remove unused variable in mtdswap
@ 2017-07-25 15:41 Arnd Bergmann
2017-07-25 17:02 ` Brian Norris
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-07-25 15:41 UTC (permalink / raw)
To: David Woodhouse, Brian Norris, Boris Brezillon, Marek Vasut,
Richard Weinberger, Cyrille Pitchen
Cc: Arnd Bergmann, Mario Rugiero, Colin Ian King, Geliang Tang,
linux-mtd, linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: remove unused variable in mtdswap
2017-07-25 15:41 [PATCH] mtd: remove unused variable in mtdswap Arnd Bergmann
@ 2017-07-25 17:02 ` Brian Norris
0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2017-07-25 17:02 UTC (permalink / raw)
To: Arnd Bergmann
Cc: David Woodhouse, Boris Brezillon, Marek Vasut, Richard Weinberger,
Cyrille Pitchen, Mario Rugiero, Colin Ian King, Geliang Tang,
linux-mtd, linux-kernel
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'
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-25 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 15:41 [PATCH] mtd: remove unused variable in mtdswap Arnd Bergmann
2017-07-25 17:02 ` Brian Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).