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: <CADLLry4jOr1S7YhdN5saRCXSnjTt_J=TB+sm=CjbcW9NJ4V7Pg@mail.gmail.com>
Date:   Wed, 27 Nov 2019 22:02:49 +0900
From:   Austin Kim <austindh.kim@...il.com>
To:     Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc:     arend.vanspriel@...adcom.com, franky.lin@...adcom.com,
        hante.meuleman@...adcom.com, chi-hsien.lin@...ress.com,
        wright.feng@...ress.com, Kalle Valo <kvalo@...eaurora.org>,
        davem@...emloft.net, linux-wireless@...r.kernel.org,
        brcm80211-dev-list.pdl@...adcom.com,
        brcm80211-dev-list@...ress.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] brcmsmac: Remove always false 'channel < 0' statement

2019년 11월 27일 (수) 오후 7:48, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com>님이 작성:
>
> On 27.11.2019 8:43, Austin Kim wrote:
>
> > As 'channel' is declared as u16, the following statement is always false.
> >     channel < 0
> >
> > So we can remove unnecessary 'always false' statement.
>
>     It's an expression, not a statement.
>

According to below link, it is okay to use 'statement' in above case.
https://en.wikipedia.org/wiki/Statement_(computer_science)

Why don't you show your opition about patch rather than commit message?

Thanks,
Austin Kim

> > Signed-off-by: Austin Kim <austindh.kim@...il.com>
> > ---
> >   drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
> > index 3f09d89..7f2c15c 100644
> > --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
> > +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
> > @@ -5408,7 +5408,7 @@ int brcms_c_set_channel(struct brcms_c_info *wlc, u16 channel)
> >   {
> >       u16 chspec = ch20mhz_chspec(channel);
> >
> > -     if (channel < 0 || channel > MAXCHANNEL)
> > +     if (channel > MAXCHANNEL)
> >               return -EINVAL;
> >
> >       if (!brcms_c_valid_chanspec_db(wlc->cmi, chspec))
>
> MBR, Sergei
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ