All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirtika Ruchandani <kirtika.ruchandani@gmail.com>
To: Amitkumar Karwar <akarwar@marvell.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless@vger.kernel.org,
	Nishant Sarmukadam <nishants@marvell.com>,
	Zhaoyang Liu <liuzy@marvell.com>, Bing Zhao <bzhao@marvell.com>,
	Xinming Hu <huxm@marvell.com>, Avinash Patil <patila@marvell.com>
Subject: [PATCH 5/7] mwifiex: Remove unused 'pm_flag' variable
Date: Fri, 18 Nov 2016 00:45:54 -0800	[thread overview]
Message-ID: <41391bae10a957d9146b25d6919a2d69f4b5e2f0.1479458373.git.kirtika@google.com> (raw)
In-Reply-To: <cover.1479458373.git.kirtika@google.com>

mwifiex_sdio_resume() intializes pm_flag, just like mwifiex_sdio_suspend(), but
does not use it. Compiling with W=1 gives the following warning, fix it.
mwifiex/sdio.c: In function ‘mwifiex_sdio_resume’:
mwifiex/sdio.c:234:16: warning: variable ‘pm_flag’ set but not used [-Wunused-but-set-variable]

sdio_get_host_pm_caps() is just an acessor, so the call to it is safe to
remove.
The unused variable seems to be present since 5e6e3a92b9a4 which introduced
mwifiex_sdio_resume().

Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver")
Cc: Bing Zhao <bzhao@marvell.com>
Cc: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kirtika Ruchandani <kirtika@google.com>
---
 drivers/net/wireless/marvell/mwifiex/sdio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index 8718950..41ec59d7 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -231,10 +231,8 @@ static int mwifiex_sdio_resume(struct device *dev)
 	struct sdio_func *func = dev_to_sdio_func(dev);
 	struct sdio_mmc_card *card;
 	struct mwifiex_adapter *adapter;
-	mmc_pm_flag_t pm_flag = 0;

 	if (func) {
-		pm_flag = sdio_get_host_pm_caps(func);
 		card = sdio_get_drvdata(func);
 		if (!card || !card->adapter) {
 			pr_err("resume: invalid card or adapter\n");
--
2.8.0.rc3.226.g39d4020

  parent reply	other threads:[~2016-11-18  8:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  8:43 [PATCH 0/7] Fix -Wunused-but-set-variable in mwifiex/ Kirtika Ruchandani
2016-11-18  8:44 ` [PATCH 1/7] mwifiex: Removed unused mwifiex_private* 'priv' variable Kirtika Ruchandani
2016-11-23 15:36   ` [1/7] " Kalle Valo
2016-11-18  8:44 ` [PATCH 2/7] mwifiex: Remove unused 'chan_num' variable Kirtika Ruchandani
2016-11-18  8:45 ` [PATCH 3/7] mwifiex: Remove unused 'sta_ptr' variable Kirtika Ruchandani
2016-11-18  8:45 ` [PATCH 4/7] mwifiex: Remove unused 'adapter'variable Kirtika Ruchandani
2016-11-18  8:45 ` Kirtika Ruchandani [this message]
2016-11-18  8:46 ` [PATCH 6/7] mwifiex: Removed unused 'pkt_type' variable Kirtika Ruchandani
2016-11-18  8:46 ` [PATCH 7/7] mwifiex: Remove unused 'bcd_usb' variable Kirtika Ruchandani
2016-11-18  8:49 ` [PATCH 0/7] Fix -Wunused-but-set-variable in mwifiex/ Arnd Bergmann

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=41391bae10a957d9146b25d6919a2d69f4b5e2f0.1479458373.git.kirtika@google.com \
    --to=kirtika.ruchandani@gmail.com \
    --cc=akarwar@marvell.com \
    --cc=arnd@arndb.de \
    --cc=bzhao@marvell.com \
    --cc=huxm@marvell.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=liuzy@marvell.com \
    --cc=nishants@marvell.com \
    --cc=patila@marvell.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.