From: Dan Carpenter <error27@gmail.com>
To: Andrei Khomenkov <khomenkov@mailbox.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Luka Gejak <luka.gejak@linux.dev>,
linux-staging@lists.linux.dev
Subject: Re: [PATCH v2 2/2] staging: rtl8723bs: cleanup code style and parentheses
Date: Wed, 1 Apr 2026 11:22:43 +0300 [thread overview]
Message-ID: <aczV0_IOAzbwIgHI@stanley.mountain> (raw)
In-Reply-To: <20260330184640.17795-3-khomenkov@mailbox.org>
On Mon, Mar 30, 2026 at 09:46:39PM +0300, Andrei Khomenkov wrote:
> Cleanup the driver code to better match the kernel coding style.
> This patch includes:
> - Removal of redundant parentheses in if-statements and expressions.
> - Adding missing spaces around bitwise and logical operators.
> - Reformatting multi-line conditions for better readability.
> - Reformatting long conditions for better readability.
>
> These changes are purely cosmetic and do not alter the driver logic.
>
> Signed-off-by: Andrei Khomenkov <khomenkov@mailbox.org>
> ---
> drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 +--
> .../staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
> .../staging/rtl8723bs/core/rtw_ioctl_set.c | 8 ++---
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 6 ++--
> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 +--
> drivers/staging/rtl8723bs/core/rtw_recv.c | 34 +++++++++----------
> .../staging/rtl8723bs/core/rtw_wlan_util.c | 2 +-
> drivers/staging/rtl8723bs/core/rtw_xmit.c | 23 +++++++------
> drivers/staging/rtl8723bs/hal/odm.c | 2 +-
> drivers/staging/rtl8723bs/hal/odm_DIG.c | 16 ++++-----
> .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 5 +--
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++--
> .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 9 ++---
> drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 11 +++---
> 14 files changed, 64 insertions(+), 68 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> index 9a7acabef409..f09510048b93 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
> @@ -10,8 +10,8 @@
>
> void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
> {
> - if ((media_status == RT_MEDIA_CONNECT)
These parentheses, on the other hand, you should leave because
Greg is fine or even prefers parentheses around "(foo == bar)".
So when you're converting "(foo == false) ||" to "!foo ||" then
drop the parentheses. In that situation the parens were because
of the == and then when you remove the == you need to remove the
parens as well. But here the == is in the final condition so keep
the parens.
> - && (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE))) {
> + if (media_status == RT_MEDIA_CONNECT &&
> + check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE)) {
> rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
> }
>
regards,
dan carpenter
next prev parent reply other threads:[~2026-04-01 8:22 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
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 [this message]
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=aczV0_IOAzbwIgHI@stanley.mountain \
--to=error27@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