lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=jFYn=7NGPD8UDx3_g30qD+40bCjzmWJJSzmb6pNUusQ@mail.gmail.com>
Date:   Fri, 14 Jun 2019 13:54:16 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Nathan Huckleberry <nhuck@...gle.com>, eliad@...ery.com,
        arik@...ery.com
Cc:     Kalle Valo <kvalo@...eaurora.org>,
        "David S. Miller" <davem@...emloft.net>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Re: [PATCH] wl18xx: Fix Wunused-const-variable

On Fri, Jun 14, 2019 at 10:17 AM 'Nathan Huckleberry' via Clang Built
Linux <clang-built-linux@...glegroups.com> wrote:
>
> Clang produces the following warning
>
> drivers/net/wireless/ti/wl18xx/main.c:1850:43: warning: unused variable
> 'wl18xx_iface_ap_cl_limits' [-Wunused-const-variable] static const struct
> ieee80211_iface_limit wl18xx_iface_ap_cl_limits[] = { ^
> drivers/net/wireless/ti/wl18xx/main.c:1869:43: warning: unused variable
> 'wl18xx_iface_ap_go_limits' [-Wunused-const-variable] static const struct
> ieee80211_iface_limit wl18xx_iface_ap_go_limits[] = { ^
>
> The commit that added these variables never used them. Removing them.

Previous thread, for context:
https://groups.google.com/forum/#!topic/clang-built-linux/1Lu1GT9ic94

Looking at drivers/net/wireless/ti/wl18xx/main.c, there 4 globally
declared `struct ieee80211_iface_limit` but as your patch notes, only
2 are used.  The thing is, their uses are in a `struct
ieee80211_iface_limit []`.

Looking at
$ git blame drivers/net/wireless/ti/wl18xx/main.c -L 1850
points to
commit 7845af35e0de ("wlcore: add p2p device support")
Adding Eliad and Arik to the thread; it's not clear to me what the
these variables were supposed to do, but seeing as the code in
question was already dead, this is no functional change from a user's
perspective.  With that in mind:
Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>

So I'd at least add the tag.
Fixes: 7845af35e0de ("wlcore: add p2p device support")

> --- a/drivers/net/wireless/ti/wl18xx/main.c
> +++ b/drivers/net/wireless/ti/wl18xx/main.c
> @@ -1847,44 +1847,6 @@ static const struct ieee80211_iface_limit wl18xx_iface_ap_limits[] = {
>         },
>  };
>
> -static const struct ieee80211_iface_limit wl18xx_iface_ap_cl_limits[] = {
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_STATION),
> -       },
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_AP),
> -       },
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_P2P_CLIENT),
> -       },
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
> -       },
> -};
> -
> -static const struct ieee80211_iface_limit wl18xx_iface_ap_go_limits[] = {
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_STATION),
> -       },
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_AP),
> -       },
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_P2P_GO),
> -       },
> -       {
> -               .max = 1,
> -               .types = BIT(NL80211_IFTYPE_P2P_DEVICE),
> -       },
> -};
> -

-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ