From: Colin King <colin.king@canonical.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
simran singhal <singhalsimran0@gmail.com>,
devel@driverdev.osuosl.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8192u: remove redundant initialization of 'timeout'
Date: Mon, 22 Jan 2018 15:57:30 +0000 [thread overview]
Message-ID: <20180122155730.16216-1-colin.king@canonical.com> (raw)
In-Reply-To: <20170209110643.22590-1-colin.king@canonical.com>
From: Colin Ian King <colin.king@canonical.com>
Variable timeout is initialized however this value is never read and
it is reassigned a new value a little later, hence the initialization
is redundant and can be removed.
Cleans up clang warning:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1728:6: warning:
Value stored to 'timeout' during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index f56fdc7a4b61..25c186a8bde3 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1725,7 +1725,7 @@ static void ieee80211_sta_ps_send_null_frame(struct ieee80211_device *ieee,
static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
u32 *time_l)
{
- int timeout = ieee->ps_timeout;
+ int timeout;
u8 dtim;
/*if(ieee->ps = IEEE80211_PS_DISABLED ||
ieee->iw_mode != IW_MODE_INFRA ||
--
2.15.1
next prev parent reply other threads:[~2018-01-22 15:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 11:06 [PATCH] staging: rtl8192u: remove redundant null check on array alg Colin King
2018-01-22 15:57 ` Colin King [this message]
2019-04-04 9:32 ` [PATCH] staging: rtl8192u: remove redundant null check on array 'data' Colin King
2019-04-04 9:41 ` Dan Carpenter
2019-04-04 10:28 ` Mukesh Ojha
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=20180122155730.16216-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=singhalsimran0@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox