* [PATCH] ath6kl: remove redundant variable ies_len
@ 2017-11-26 5:38 Kenneth Lu
2017-11-27 19:19 ` Steve deRosier
2017-12-07 14:21 ` Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Kenneth Lu @ 2017-11-26 5:38 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, ath6kl
To get rid of W=1 warning: variable ‘ies_len’ set but not used.
Variable ies_len is being assigned but never read.
Signed-off-by: Kenneth Lu <kuohsianglu@gmail.com>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index b53eb2b..2ba8cf3 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2766,7 +2766,6 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_mgmt *mgmt;
bool hidden = false;
u8 *ies;
- int ies_len;
struct wmi_connect_cmd p;
int res;
int i, ret;
@@ -2804,7 +2803,6 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
ies = mgmt->u.beacon.variable;
if (ies > info->beacon.head + info->beacon.head_len)
return -EINVAL;
- ies_len = info->beacon.head + info->beacon.head_len - ies;
if (info->ssid == NULL)
return -EINVAL;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ath6kl: remove redundant variable ies_len
2017-11-26 5:38 [PATCH] ath6kl: remove redundant variable ies_len Kenneth Lu
@ 2017-11-27 19:19 ` Steve deRosier
2017-12-07 14:21 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Steve deRosier @ 2017-11-27 19:19 UTC (permalink / raw)
To: Kenneth Lu; +Cc: Kalle Valo, ath6kl, linux-wireless
On Sat, Nov 25, 2017 at 9:38 PM, Kenneth Lu <kuohsianglu@gmail.com> wrote:
> To get rid of W=3D1 warning: variable =E2=80=98ies_len=E2=80=99 set but n=
ot used.
> Variable ies_len is being assigned but never read.
>
> Signed-off-by: Kenneth Lu <kuohsianglu@gmail.com>
> ---
> drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wir=
eless/ath/ath6kl/cfg80211.c
> index b53eb2b..2ba8cf3 100644
> --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
> +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> @@ -2766,7 +2766,6 @@ static int ath6kl_start_ap(struct wiphy *wiphy, str=
uct net_device *dev,
> struct ieee80211_mgmt *mgmt;
> bool hidden =3D false;
> u8 *ies;
> - int ies_len;
> struct wmi_connect_cmd p;
> int res;
> int i, ret;
> @@ -2804,7 +2803,6 @@ static int ath6kl_start_ap(struct wiphy *wiphy, str=
uct net_device *dev,
> ies =3D mgmt->u.beacon.variable;
> if (ies > info->beacon.head + info->beacon.head_len)
> return -EINVAL;
> - ies_len =3D info->beacon.head + info->beacon.head_len - ies;
>
> if (info->ssid =3D=3D NULL)
> return -EINVAL;
Oddly, ies_len was never even used in the original patch that added
it. Probably used in some debugging code that was stripped before
submitting. Seems safe to kill it.
Reviewed-by: Steve deRosier <derosier@gmail.com>
- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ath6kl: remove redundant variable ies_len
2017-11-26 5:38 [PATCH] ath6kl: remove redundant variable ies_len Kenneth Lu
2017-11-27 19:19 ` Steve deRosier
@ 2017-12-07 14:21 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-12-07 14:21 UTC (permalink / raw)
To: Kenneth Lu; +Cc: linux-wireless, ath6kl
Kenneth Lu <kuohsianglu@gmail.com> wrote:
> To get rid of W=1 warning: variable ‘ies_len’ set but not used.
> Variable ies_len is being assigned but never read.
>
> Signed-off-by: Kenneth Lu <kuohsianglu@gmail.com>
> Reviewed-by: Steve deRosier <derosier@gmail.com>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Patch applied to ath-next branch of ath.git, thanks.
d786ebb2f59b ath6kl: remove redundant variable ies_len
--
https://patchwork.kernel.org/patch/10075235/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-07 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-26 5:38 [PATCH] ath6kl: remove redundant variable ies_len Kenneth Lu
2017-11-27 19:19 ` Steve deRosier
2017-12-07 14:21 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).