diff mbox

[5/7] mwifiex: Remove unused 'pm_flag' variable

Message ID 41391bae10a957d9146b25d6919a2d69f4b5e2f0.1479458373.git.kirtika@google.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Kirtika Ruchandani Nov. 18, 2016, 8:45 a.m. UTC
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(-)

--
2.8.0.rc3.226.g39d4020
diff mbox

Patch

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");