From: Kirtika Ruchandani Date: Thu, 24 Nov 2016 01:26:06 +0000 (-0800) Subject: mwifiex: Remove unused 'pm_flag' variable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9f1db8b6859ceb75f2517cd4b54782d1024360d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mwifiex: Remove unused 'pm_flag' variable 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 Cc: Amitkumar Karwar Signed-off-by: Kirtika Ruchandani Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 1235f04c0dd4..8b33a571b6a9 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -186,9 +186,7 @@ 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; - pm_flag = sdio_get_host_pm_caps(func); card = sdio_get_drvdata(func); if (!card || !card->adapter) { dev_err(dev, "resume: invalid card or adapter\n");