From: Dan Carpenter <error27@gmail.com>
To: Eugene Mavick <m@mavick.dev>
Cc: gregkh@linuxfoundation.org, khomenkov@mailbox.org,
ethantidmore06@gmail.com, m.steinmoetzger@gmail.com,
tomasz.unger@yahoo.pl, arthur.stupa@gmail.com,
jannik@jrehkemper.de, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] staging: rtl8723bs: remove unnecessary parentheses
Date: Thu, 4 Jun 2026 08:29:36 +0300 [thread overview]
Message-ID: <aiENQEyF-N4CRVzt@stanley.mountain> (raw)
In-Reply-To: <20260604045112.830216-1-m@mavick.dev>
On Thu, Jun 04, 2026 at 12:51:12PM +0800, Eugene Mavick wrote:
> Remove unnecessary parentheses to clear checkpatch.pl warnings
>
> Example of fixed warnings:
> CHECK: Unnecessary parentheses around dvobj->cam_cache[id]
>
> Signed-off-by: Eugene Mavick <m@mavick.dev>
> ---
When I'm reviewing patches one thing that I'm checking is that if
people deliberately tries to slip something unexpected into the patch.
I created a script to help me strip away many of the common staging
changes so I can focus on the interesting stuff.
https://github.com/error27/rename_rev
This is v4 of this patch and so at this point what I really want is for
my script to say there is nothing unexpected at all. Almost everything
here is related to the checkpatch warning about &(foo->bar). Some of
the other changes are good, but at this point, I just want to get
something we can apply. Do the other changes in a different patch.
Here is the output from my script that I want removed.
`cat email.txt | rename_rev.pl -r amp`
> struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
>
> - if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable)) {
> + if (pmlmeinfo->HT_info_enable && pmlmeinfo->HT_caps_enable) {
Good but do it in another patch.
> pmlmeinfo->HT_enable = 1;
> } else {
> pmlmeinfo->HT_enable = 0;
> @@ -152,7 +152,7 @@
>
> case 2: /* auto */
> default:
> - if ((pmlmeinfo->ERP_enable) && (pmlmeinfo->ERP_IE & BIT(1))) {
> + if (pmlmeinfo->ERP_enable && (pmlmeinfo->ERP_IE & BIT(1))) {
Same.
> if (pregpriv->vcs_type == 1) {
> psta->rtsen = 1;
> psta->cts2self = 0;
> @@ -168,13 +168,13 @@
>
> if (encryp_protocol == ENCRYP_PROTOCOL_WPA || encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
> pbuf = rtw_get_wpa_ie(&bssid->ies[12], &wpa_ielen, bssid->ie_length - 12);
> - if (pbuf && (wpa_ielen > 0)) {
> + if (pbuf && wpa_ielen > 0) {
No. Don't do this.
> rtw_parse_wpa_ie(pbuf, wpa_ielen + 2, &group_cipher,
> &pairwise_cipher, &is_8021x);
> } else {
> pbuf = rtw_get_wpa2_ie(&bssid->ies[12], &wpa_ielen, bssid->ie_length - 12);
>
> - if (pbuf && (wpa_ielen > 0))
> + if (pbuf && wpa_ielen > 0)
No. Don't do this.
> rtw_parse_wpa2_ie(pbuf, wpa_ielen + 2, &group_cipher,
> &pairwise_cipher, &is_8021x);
> }
> @@ -182,8 +182,11 @@
>
> pmlmepriv->NumOfBcnInfoChkFail++;
>
> - if ((pmlmepriv->timeBcnInfoChkStart != 0) && (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) <= DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)
> - && (pmlmepriv->NumOfBcnInfoChkFail >= DISCONNECT_BY_CHK_BCN_FAIL_THRESHOLD)) {
> + if ((pmlmepriv->timeBcnInfoChkStart != 0) &&
> + (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) <=
> + DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS) &&
> + pmlmepriv->NumOfBcnInfoChkFail >=
> + DISCONNECT_BY_CHK_BCN_FAIL_THRESHOLD) {
This seems unrelated to parentheses. Do it another patch.
> pmlmepriv->timeBcnInfoChkStart = 0;
> pmlmepriv->NumOfBcnInfoChkFail = 0;
> return _FAIL;
> @@ -228,7 +231,7 @@
> struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
> unsigned char *rate = cur_network->supported_rates;
>
> - if ((pmlmeinfo->HT_info_enable) && (pmlmeinfo->HT_caps_enable))
> + if (pmlmeinfo->HT_info_enable && pmlmeinfo->HT_caps_enable)
Good but do it in another patch.
> pmlmeinfo->HT_enable = 1;
>
> if (pmlmeinfo->HT_enable)
>
> done.
regards,
dan carpenter
next prev parent reply other threads:[~2026-06-04 5:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 3:16 [PATCH] " Eugene Mavick
2026-05-31 6:10 ` [PATCH v2] " Eugene Mavick
2026-06-01 11:29 ` Dan Carpenter
[not found] ` <20260603080105.780648-1-m@mavick.dev>
2026-06-03 8:44 ` [PATCH v3] " Dan Carpenter
[not found] ` <DIZB2839PXFV.3A5L73XAO2X67@mavick.dev>
2026-06-03 10:18 ` Dan Carpenter
2026-06-04 4:51 ` [PATCH v4] " Eugene Mavick
2026-06-04 5:29 ` Dan Carpenter [this message]
2026-06-04 7:49 ` [PATCH v5] " Eugene Mavick
2026-06-04 7:54 ` Dan Carpenter
2026-06-04 9:56 ` [PATCH v6] " Eugene Mavick
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=aiENQEyF-N4CRVzt@stanley.mountain \
--to=error27@gmail.com \
--cc=arthur.stupa@gmail.com \
--cc=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jannik@jrehkemper.de \
--cc=khomenkov@mailbox.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=m.steinmoetzger@gmail.com \
--cc=m@mavick.dev \
--cc=tomasz.unger@yahoo.pl \
/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®