From: Julia Lawall <julia.lawall@lip6.fr>
To: Shraddha Barke <shraddha.6596@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jes Sorensen <Jes.Sorensen@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] Staging: rtl8188eu: Bool tests don't need comparisons
Date: Sun, 13 Sep 2015 07:32:53 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1509130730200.2057@localhost6.localdomain6> (raw)
In-Reply-To: <CAO393ADgv9pagiMpKATAcSvec_4TONUmUutCZDOr_T4ujxGsRQ@mail.gmail.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2896 bytes --]
On Sun, 13 Sep 2015, Shraddha Barke wrote:
>
>
> On Sat, Sep 12, 2015 at 11:07 PM, Julia Lawall <julia.lawall@lip6.fr>
> wrote:
>
>
> On Sat, 12 Sep 2015, Shraddha Barke wrote:
>
> > This patch removes comparisons to true/false values on bool
> variables.
> >
> > Changes in v3-
> > Fix made manually
> >
> > Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
> > ---
> > drivers/staging/rtl8188eu/core/rtw_cmd.c | 12
> +++++------
> > drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 28
> +++++++++++++-------------
> > 2 files changed, 20 insertions(+), 20 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c
> b/drivers/staging/rtl8188eu/core/rtw_cmd.c
> > index 001a2f3..591ac5d 100644
> > --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
> > +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
> > @@ -272,7 +272,7 @@ u8 rtw_sitesurvey_cmd(struct adapter
> *padapter, struct ndis_802_11_ssid *ssid,
> > struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
> > struct mlme_priv *pmlmepriv =
> &padapter->mlmepriv;
> >
> > - if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
> > + if (check_fwstate(pmlmepriv, _FW_LINKED))
> > rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SCAN,
> 1);
> >
> > ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
> > @@ -903,7 +903,7 @@ static void dynamic_chk_wk_hdl(struct
> adapter *padapter, u8 *pbuf, int sz)
> > pmlmepriv = &(padapter->mlmepriv);
> >
> > #ifdef CONFIG_88EU_AP_MODE
> > - if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
> > + if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
> > expire_timeout_chk(padapter);
> > #endif
> >
> > @@ -920,13 +920,13 @@ static void lps_ctrl_wk_hdl(struct
> adapter *padapter, u8 lps_ctrl_type)
> > u8 mstatus;
> >
> >
> > - if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)
> == true) ||
> > - (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ==
> true))
> > + if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
> ||
> > + (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)))
>
> You don't need to keep the parentheses.
>
> julia
>
> I don't see extra parentheses. Aren't all of them needed to improve
> readability?
You have basically ((foo(1,2,3)) || (foo(4,5,6)))
I don't think that is more readable than (foo(1,2,3) || foo(4,5,6))
Actually, the parentheses weren't really needed before, but they are even
less useful now.
julia
prev parent reply other threads:[~2015-09-13 5:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-12 17:32 [PATCH v3 1/3] Staging: rtl8723au: core: " Shraddha Barke
2015-09-12 17:32 ` [PATCH v3 2/3] Staging: vt6656: " Shraddha Barke
2015-09-12 17:32 ` [PATCH v3 3/3] Staging: rtl8188eu: " Shraddha Barke
2015-09-12 17:37 ` Julia Lawall
[not found] ` <CAO393ADgv9pagiMpKATAcSvec_4TONUmUutCZDOr_T4ujxGsRQ@mail.gmail.com>
2015-09-13 5:32 ` Julia Lawall [this message]
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=alpine.DEB.2.02.1509130730200.2057@localhost6.localdomain6 \
--to=julia.lawall@lip6.fr \
--cc=Jes.Sorensen@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shraddha.6596@gmail.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
all inboxes | Powered by JetHome®