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] [day] [month] [year] [list]
Message-ID: <CAKXUXMxLuViULgrgP89uBNvbUYcWFiohgWD=LXkifCGTT1WYFQ@mail.gmail.com>
Date:   Fri, 12 Aug 2022 12:33:31 +0200
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Johannes Berg <johannes@...solutions.net>,
        linux-wireless <linux-wireless@...r.kernel.org>,
        kernel-janitors <kernel-janitors@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] wifi: mac80211: clean up a needless assignment in ieee80211_sta_activate_link()

On Fri, Aug 12, 2022 at 12:02 PM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> On Fri, Aug 12, 2022 at 11:44:38AM +0200, Lukas Bulwahn wrote:
> > Commit 177577dbd223 ("wifi: mac80211: sta_info: fix link_sta insertion")
> > makes ieee80211_sta_activate_link() return 0 in the 'hash' label case.
> > Hence, setting ret in the !test_sta_flag(...) branch to zero is not needed
> > anymore and can be dropped.
> >
> > Remove a needless assignment.
> >
> > No functional change. No change in object code.
> >
> > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...il.com>
> > ---
> >  net/mac80211/sta_info.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> > index cb23da9aff1e..492c7a29d797 100644
> > --- a/net/mac80211/sta_info.c
> > +++ b/net/mac80211/sta_info.c
> > @@ -2778,7 +2778,6 @@ int ieee80211_sta_activate_link(struct sta_info *sta, unsigned int link_id)
> >       sta->sta.valid_links = new_links;
> >
> >       if (!test_sta_flag(sta, WLAN_STA_INSERTED)) {
> > -             ret = 0;
> >               goto hash;
> >       }
>
> Please, remove the {} as well.
>

Thanks for the pointer, Dan! I need to remember that for the future; I
did expect checkpatch to warn me of such a stylistic pattern, but it
seems that it does not. So I just need to have an eye on that.

Patch v2 sent out:
https://lore.kernel.org/lkml/20220812103126.25308-1-lukas.bulwahn@gmail.com/

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ