linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin Kim <austindh.kim@gmail.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: arend.vanspriel@broadcom.com, franky.lin@broadcom.com,
	hante.meuleman@broadcom.com, chi-hsien.lin@cypress.com,
	wright.feng@cypress.com, Kalle Valo <kvalo@codeaurora.org>,
	davem@davemloft.net, linux-wireless@vger.kernel.org,
	brcm80211-dev-list.pdl@broadcom.com,
	brcm80211-dev-list@cypress.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] brcmsmac: Remove always false 'channel < 0' statement
Date: Wed, 27 Nov 2019 22:02:49 +0900	[thread overview]
Message-ID: <CADLLry4jOr1S7YhdN5saRCXSnjTt_J=TB+sm=CjbcW9NJ4V7Pg@mail.gmail.com> (raw)
In-Reply-To: <46dfe877-4f32-b763-429f-7af3a83828f0@cogentembedded.com>

2019년 11월 27일 (수) 오후 7:48, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.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@gmail.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
>

  reply	other threads:[~2019-11-27 13:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27  5:43 [PATCH] brcmsmac: Remove always false 'channel < 0' statement Austin Kim
2019-11-27 10:48 ` Sergei Shtylyov
2019-11-27 13:02   ` Austin Kim [this message]
2019-11-27 13:35     ` Kalle Valo
     [not found]     ` <0101016ead12c253-18d4624e-98eb-4252-ba3a-fabf74d831f2-000000@us-west-2.amazonses.com>
2019-11-27 22:21       ` Austin Kim
2019-12-18 18:28 ` Kalle Valo

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='CADLLry4jOr1S7YhdN5saRCXSnjTt_J=TB+sm=CjbcW9NJ4V7Pg@mail.gmail.com' \
    --to=austindh.kim@gmail.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=chi-hsien.lin@cypress.com \
    --cc=davem@davemloft.net \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    --cc=wright.feng@cypress.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;
as well as URLs for NNTP newsgroup(s).