public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c
@ 2026-03-23 19:15 sajal90
  2026-03-24  2:47 ` Ethan Tidmore
  2026-03-24 11:20 ` Andy Shevchenko
  0 siblings, 2 replies; 4+ messages in thread
From: sajal90 @ 2026-03-23 19:15 UTC (permalink / raw)
  To: gregkh, s9430939
  Cc: andriy.shevchenko, linux-staging, linux-kernel, sajal2005gupta

---
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
index 0be3143fffe5..d5027aafbdb1 100644
--- a/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/xmit_linux.c
@@ -193,12 +193,11 @@ void _rtw_xmit_entry(struct sk_buff *pkt, struct net_device *pnetdev)
 
 	rtw_check_xmit_resource(padapter, pkt);
 
-	if (!rtw_mc2u_disable
-		&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == true
-		&& (IP_MCAST_MAC(pkt->data)
-			|| ICMPV6_MCAST_MAC(pkt->data)
-			)
-		&& padapter->registrypriv.wifi_spec == 0) {
+	if (!rtw_mc2u_disable &&
+		check_fwstate(pmlmepriv, WIFI_AP_STATE) == true &&
+		(IP_MCAST_MAC(pkt->data) ||
+		 ICMPV6_MCAST_MAC(pkt->data)) &&
+		padapter->registrypriv.wifi_spec == 0) {
 		if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) {
 			res = rtw_mlcst2unicst(padapter, pkt);
 			if (res)
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c
  2026-03-23 19:15 [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c sajal90
@ 2026-03-24  2:47 ` Ethan Tidmore
  2026-03-24 11:22   ` Andy Shevchenko
  2026-03-24 11:20 ` Andy Shevchenko
  1 sibling, 1 reply; 4+ messages in thread
From: Ethan Tidmore @ 2026-03-24  2:47 UTC (permalink / raw)
  To: sajal90, gregkh, s9430939; +Cc: andriy.shevchenko, linux-staging, linux-kernel

On Mon Mar 23, 2026 at 2:15 PM CDT, sajal90 wrote:
> ---
You must have a SOB here above this line with your real name. Also, you
must have a patch note.

...

> -	if (!rtw_mc2u_disable
> -		&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == true
> -		&& (IP_MCAST_MAC(pkt->data)
> -			|| ICMPV6_MCAST_MAC(pkt->data)
> -			)
> -		&& padapter->registrypriv.wifi_spec == 0) {
> +	if (!rtw_mc2u_disable &&
> +		check_fwstate(pmlmepriv, WIFI_AP_STATE) == true &&
> +		(IP_MCAST_MAC(pkt->data) ||
> +		 ICMPV6_MCAST_MAC(pkt->data)) &&
> +		padapter->registrypriv.wifi_spec == 0) {
>  		if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME / 4)) {
>  			res = rtw_mlcst2unicst(padapter, pkt);
>  			if (res)

 You fixed the logical continuation problem but the alignment is still
 wrong. It should be something like:

	if (!rtw_mc2u_disable &&
	    check_fwstate(pmlmepriv, WIFI_AP_STATE) &&
	    (IP_MCAST_MAC(pkt->data) || 
	     ICMPV6_MCAST_MAC(pkt->data)) &&
	    !padapter->registrypriv.wifi_spec) {

As you can see I removed the "== true" and the "== 0". Since you're
editing the line it's best to remove other checkpatch.pl warnings.
Mention these are removed in your patch notes aswell.

Thanks,

ET

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c
  2026-03-23 19:15 [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c sajal90
  2026-03-24  2:47 ` Ethan Tidmore
@ 2026-03-24 11:20 ` Andy Shevchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-03-24 11:20 UTC (permalink / raw)
  To: sajal90; +Cc: gregkh, s9430939, linux-staging, linux-kernel

On Tue, Mar 24, 2026 at 12:45:01AM +0530, sajal90 wrote:

This is NOT how the patches should be formed.
Your homework:

- read and study Submitting Patches documentation
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

- read this
https://chris.beams.io/git-commit

> ---
>  drivers/staging/rtl8723bs/os_dep/xmit_linux.c | 11 +++++------

...

> -	if (!rtw_mc2u_disable
> -		&& check_fwstate(pmlmepriv, WIFI_AP_STATE) == true
> -		&& (IP_MCAST_MAC(pkt->data)
> -			|| ICMPV6_MCAST_MAC(pkt->data)
> -			)
> -		&& padapter->registrypriv.wifi_spec == 0) {
> +	if (!rtw_mc2u_disable &&
> +		check_fwstate(pmlmepriv, WIFI_AP_STATE) == true &&
> +		(IP_MCAST_MAC(pkt->data) ||
> +		 ICMPV6_MCAST_MAC(pkt->data)) &&
> +		padapter->registrypriv.wifi_spec == 0) {

This isn't correct, fix the indentation and the logical splits
(less lines can be made).

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c
  2026-03-24  2:47 ` Ethan Tidmore
@ 2026-03-24 11:22   ` Andy Shevchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2026-03-24 11:22 UTC (permalink / raw)
  To: Ethan Tidmore; +Cc: sajal90, gregkh, s9430939, linux-staging, linux-kernel

On Mon, Mar 23, 2026 at 09:47:42PM -0500, Ethan Tidmore wrote:
> On Mon Mar 23, 2026 at 2:15 PM CDT, sajal90 wrote:

...

>  You fixed the logical continuation problem but the alignment is still
>  wrong. It should be something like:
> 
> 	if (!rtw_mc2u_disable &&
> 	    check_fwstate(pmlmepriv, WIFI_AP_STATE) &&

Why not

	if (!rtw_mc2u_disable && check_fwstate(pmlmepriv, WIFI_AP_STATE) &&

?

> 	    (IP_MCAST_MAC(pkt->data) || 
> 	     ICMPV6_MCAST_MAC(pkt->data)) &&

This also can be joined as it's logically a one piece of the conditional.

	    (IP_MCAST_MAC(pkt->data) || ICMPV6_MCAST_MAC(pkt->data)) &&

> 	    !padapter->registrypriv.wifi_spec) {

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-24 11:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 19:15 [PATCH] staging: rtl8723bs: tidy logical continuations in xmit_linux.c sajal90
2026-03-24  2:47 ` Ethan Tidmore
2026-03-24 11:22   ` Andy Shevchenko
2026-03-24 11:20 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox