All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Khushal Chitturi <khushalchitturi@gmail.com>
Cc: gregkh@linuxfoundation.org, hansg@kernel.org,
	straube.linux@gmail.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] staging: rtl8723bs: simplify boolean expressions
Date: Sun, 18 Jan 2026 14:59:57 +0300	[thread overview]
Message-ID: <aWzLPQ_T5InVjT_V@stanley.mountain> (raw)
In-Reply-To: <20260115102910.10018-3-khushalchitturi@gmail.com>

On Thu, Jan 15, 2026 at 03:59:08PM +0530, Khushal Chitturi wrote:
> Simplify boolean expressions in rtw_xmit.c to
> comply with the kernel coding style
> 
> Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
> ---
>  drivers/staging/rtl8723bs/core/rtw_xmit.c | 38 ++++++++++++-----------
>  1 file changed, 20 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> index bbc42db1c828..97e38ef62ac4 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
> @@ -384,7 +384,8 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
>  	} else {
>  		while (true) {
>  			/* IOT action */
> -			if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) && (pattrib->ampdu_en == true) &&
> +			if ((pmlmeinfo->assoc_AP_vendor == HT_IOT_PEER_ATHEROS) &&
> +			    (pattrib->ampdu_en) &&

What are these parens for?

>  			    (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) {
>  				pattrib->vcs_mode = CTS_TO_SELF;
>  				break;
> @@ -420,7 +421,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
>  			/* to do list: check MIMO power save condition. */
>  
>  			/* check AMPDU aggregation for TXOP */
> -			if (pattrib->ampdu_en == true) {
> +			if (pattrib->ampdu_en) {
>  				pattrib->vcs_mode = RTS_CTS;
>  				break;
>  			}
> @@ -482,10 +483,10 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p
>  	memset(pattrib->dot11tkiptxmickey.skey,  0, 16);
>  	pattrib->mac_id = psta->mac_id;
>  
> -	if (psta->ieee8021x_blocked == true) {
> +	if (psta->ieee8021x_blocked) {
>  		pattrib->encrypt = 0;
>  
> -		if ((pattrib->ether_type != 0x888e) && (check_fwstate(pmlmepriv, WIFI_MP_STATE) == false)) {
> +		if ((pattrib->ether_type != 0x888e) && (!check_fwstate(pmlmepriv, WIFI_MP_STATE))) {

These parens?

>  			res = _FAIL;
>  			goto exit;
>  		}
> @@ -639,8 +640,8 @@ static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct p
>  	memcpy(pattrib->dst, &etherhdr.h_dest, ETH_ALEN);
>  	memcpy(pattrib->src, &etherhdr.h_source, ETH_ALEN);
>  
> -	if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true) ||
> -		(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true)) {
> +	if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) ||
> +	    (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) {

These etc?

regards,
dan carpenter


  reply	other threads:[~2026-01-18 12:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-15 10:29 [PATCH 0/4] staging: rtl8723bs: coding style and refactoring cleanups Khushal Chitturi
2026-01-15 10:29 ` [PATCH 1/4] staging: rtl8723bs: fix operator and type cast spacing Khushal Chitturi
2026-01-15 10:29 ` [PATCH 2/4] staging: rtl8723bs: simplify boolean expressions Khushal Chitturi
2026-01-18 11:59   ` Dan Carpenter [this message]
2026-01-23 13:37     ` Khushal Chitturi
2026-01-15 10:29 ` [PATCH 3/4] staging: rtl8723bs: rename CamelCase identifiers to snake_case Khushal Chitturi
2026-01-18 12:02   ` Dan Carpenter
2026-01-15 10:29 ` [PATCH 4/4] staging: rtl8723bs: fix line length and alignment issues Khushal Chitturi
2026-01-15 11:20 ` [PATCH 0/4] staging: rtl8723bs: coding style and refactoring cleanups Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2026-01-15  9:34 Khushal Chitturi
2026-01-15  9:34 ` [PATCH 2/4] staging: rtl8723bs: simplify boolean expressions Khushal Chitturi

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=aWzLPQ_T5InVjT_V@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=khushalchitturi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=straube.linux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.