public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: "Ethan Tidmore" <ethantidmore06@gmail.com>
To: "Andrei Khomenkov" <khomenkov@mailbox.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Luka Gejak" <luka.gejak@linux.dev>, <linux-staging@lists.linux.dev>
Subject: Re: [PATCH v2 1/2] staging: rtl8723bs: simplify boolean comparisons
Date: Tue, 31 Mar 2026 17:13:13 -0500	[thread overview]
Message-ID: <DHHBA6PEJEWK.1V2JC433HHM9H@gmail.com> (raw)
In-Reply-To: <20260330184640.17795-2-khomenkov@mailbox.org>

On Mon Mar 30, 2026 at 1:46 PM CDT, Andrei Khomenkov wrote:
> Simplify boolean comparisons to improve code readability
> and match the kernel coding style.
>
> Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
> ---

...

>  void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
>  {
>  	if ((media_status == RT_MEDIA_CONNECT)
> -		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
> +		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE))) {
>  		rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
>  	}

I don't see why you can't remove the parenthesis after simplifying the
boolean expression in this patch.

Also, didn't read this entire patch after scanning it for a while, your
other patch was doing multiple changes in a single patch as Greg's bot
pointed out. Maybe make a series per file the first patch simplifying
the boolean expression and then one or two after (depending on if they
are different changes) cleaning up the code around them. This would be
much easier to review.

Thanks,

ET

  reply	other threads:[~2026-03-31 22:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 18:46 [PATCH v2 0/2] staging: rtl8723bs: cleanup code and style Andrei Khomenkov
2026-03-30 18:46 ` [PATCH v2 1/2] staging: rtl8723bs: simplify boolean comparisons Andrei Khomenkov
2026-03-31 22:13   ` Ethan Tidmore [this message]
2026-04-01  8:18   ` Dan Carpenter
2026-03-30 18:46 ` [PATCH v2 2/2] staging: rtl8723bs: cleanup code style and parentheses Andrei Khomenkov
2026-03-31  8:39   ` Greg Kroah-Hartman
2026-04-01  8:22   ` Dan Carpenter
2026-03-30 20:23 ` [PATCH v2 0/2] staging: rtl8723bs: cleanup code and style Luka Gejak
2026-03-31 11:06 ` Luka Gejak

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=DHHBA6PEJEWK.1V2JC433HHM9H@gmail.com \
    --to=ethantidmore06@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=khomenkov@mailbox.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=luka.gejak@linux.dev \
    /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