* [PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd'
@ 2017-07-25 0:05 Brian Norris
2017-07-25 17:03 ` Brian Norris
0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2017-07-25 0:05 UTC (permalink / raw)
To: linux-mtd; +Cc: Boris Brezillon, Brian Norris, Mario J . Rugiero
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd'
2017-07-25 0:05 [PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd' Brian Norris
@ 2017-07-25 17:03 ` Brian Norris
0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2017-07-25 17:03 UTC (permalink / raw)
To: linux-mtd; +Cc: Boris Brezillon, Mario J . Rugiero, Arnd Bergmann
On Mon, Jul 24, 2017 at 05:05:24PM -0700, Brian Norris wrote:
> 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>
Arnd sent the same thing. Applied this one to l2-mtd.git.
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-25 17:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 0:05 [PATCH] mtd: mtdswap: remove unused variables 'dev' and 'gd' Brian Norris
2017-07-25 17:03 ` Brian Norris
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.