public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator
@ 2026-04-23 18:42 mgcvale
  2026-04-24 13:39 ` Luka Gejak
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: mgcvale @ 2026-04-23 18:42 UTC (permalink / raw)
  To: linux-staging, linux-kernel, gregkh; +Cc: ~lkcamp/patches, koike, mgcvale

Fix checkpatch error "Comparison to NULL could be written
"!psta"" in ioctl_cfg80211.c:2432

Signed-off-by: mgcvale <miguelcvalealt@gmail.com>

---
Hey, this is my first patch, so I appreciate any feedback.
Thanks!
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index fd3bae31b0ed..8ae3adecafd9 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
 	spin_lock_bh(&pstapriv->asoc_list_lock);
 	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
 	spin_unlock_bh(&pstapriv->asoc_list_lock);
-	if (psta == NULL) {
+	if (!psta) {
 		ret = -ENOENT;
 		goto exit;
 	}
-- 
2.52.0


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

* Re: [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator
  2026-04-23 18:42 [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator mgcvale
@ 2026-04-24 13:39 ` Luka Gejak
  2026-04-26 20:11 ` Greg KH
  2026-04-27 19:37 ` [PATCH v2] " Miguel Cyrineu Vale
  2 siblings, 0 replies; 5+ messages in thread
From: Luka Gejak @ 2026-04-24 13:39 UTC (permalink / raw)
  To: mgcvale, linux-staging, linux-kernel, gregkh
  Cc: ~lkcamp/patches, koike, Luka Gejak

On Thu Apr 23, 2026 at 8:42 PM CEST, mgcvale wrote:

Hi Mgcvale,
thanks for the patch, few notes below.

> Fix checkpatch error "Comparison to NULL could be written
> "!psta"" in ioctl_cfg80211.c:2432

You shouldn't break line above like that, idealy break it at 70-72 
characters, not 58.

>
> Signed-off-by: mgcvale <miguelcvalealt@gmail.com>

Signed-off-by tag must use real name to satify Developer's certificate 
of origin, so Signed-off-by: Firstname Lastname <email>

>
 ^^^^
You also have unnecessary blank line above, which should be removed.

> ---
> Hey, this is my first patch, so I appreciate any feedback.
> Thanks!
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index fd3bae31b0ed..8ae3adecafd9 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
>  	spin_lock_bh(&pstapriv->asoc_list_lock);
>  	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
>  	spin_unlock_bh(&pstapriv->asoc_list_lock);
> -	if (psta == NULL) {
> +	if (!psta) {
>  		ret = -ENOENT;
>  		goto exit;
>  	}

So please send v2 with mentioned changes, code itself is good and should
be left as is.
Best regards,
Luka Gejak

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

* Re: [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator
  2026-04-23 18:42 [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator mgcvale
  2026-04-24 13:39 ` Luka Gejak
@ 2026-04-26 20:11 ` Greg KH
  2026-04-27 19:37 ` [PATCH v2] " Miguel Cyrineu Vale
  2 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2026-04-26 20:11 UTC (permalink / raw)
  To: mgcvale; +Cc: linux-staging, linux-kernel, ~lkcamp/patches, koike

On Thu, Apr 23, 2026 at 03:42:02PM -0300, mgcvale wrote:
> Fix checkpatch error "Comparison to NULL could be written
> "!psta"" in ioctl_cfg80211.c:2432
> 
> Signed-off-by: mgcvale <miguelcvalealt@gmail.com>
> 
> ---
> Hey, this is my first patch, so I appreciate any feedback.
> Thanks!
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index fd3bae31b0ed..8ae3adecafd9 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
>  	spin_lock_bh(&pstapriv->asoc_list_lock);
>  	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
>  	spin_unlock_bh(&pstapriv->asoc_list_lock);
> -	if (psta == NULL) {
> +	if (!psta) {
>  		ret = -ENOENT;
>  		goto exit;
>  	}
> -- 
> 2.52.0
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- It looks like you did not use your "real" name for the patch on either
  the Signed-off-by: line, or the From: line (both of which have to
  match).  Please read the kernel file,
  Documentation/process/submitting-patches.rst for how to do this
  correctly.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* [PATCH v2] staging: rtl8723bs: replace NULL comparison with NOT operator
  2026-04-23 18:42 [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator mgcvale
  2026-04-24 13:39 ` Luka Gejak
  2026-04-26 20:11 ` Greg KH
@ 2026-04-27 19:37 ` Miguel Cyrineu Vale
  2026-04-27 19:50   ` Luka Gejak
  2 siblings, 1 reply; 5+ messages in thread
From: Miguel Cyrineu Vale @ 2026-04-27 19:37 UTC (permalink / raw)
  To: gregkh
  Cc: linux-staging, linux-kernel, luka.gejak, koike, ~lkcamp/patches,
	miguelcvalealt

Fix checkpatch error "Comparison to NULL could be written "!psta"" in
ioctl_cfg80211.c:2432

Signed-off-by: Miguel Cyrineu Vale <miguelcvalealt@gmail.com>
---
Hey, thanks for the feedback on v1! This is still my first patch, so I'm
learning the ropes with the DCO and formatting.

Changes in v2:
- Use real name in Signed-off-by tag.
- Fix commit message line wrapping and remove unnecessary blank lines.
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index fd3bae31b0ed..8ae3adecafd9 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
 	spin_lock_bh(&pstapriv->asoc_list_lock);
 	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
 	spin_unlock_bh(&pstapriv->asoc_list_lock);
-	if (psta == NULL) {
+	if (!psta) {
 		ret = -ENOENT;
 		goto exit;
 	}
-- 
2.53.0


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

* Re: [PATCH v2] staging: rtl8723bs: replace NULL comparison with NOT operator
  2026-04-27 19:37 ` [PATCH v2] " Miguel Cyrineu Vale
@ 2026-04-27 19:50   ` Luka Gejak
  0 siblings, 0 replies; 5+ messages in thread
From: Luka Gejak @ 2026-04-27 19:50 UTC (permalink / raw)
  To: Miguel Cyrineu Vale, gregkh
  Cc: linux-staging, linux-kernel, koike, ~lkcamp/patches,
	miguelcvalealt, luka.gejak

On April 27, 2026 9:37:59 PM GMT+02:00, Miguel Cyrineu Vale <miguelcvalealt@gmail.com> wrote:
>Fix checkpatch error "Comparison to NULL could be written "!psta"" in
>ioctl_cfg80211.c:2432
>
>Signed-off-by: Miguel Cyrineu Vale <miguelcvalealt@gmail.com>
>---
>Hey, thanks for the feedback on v1! This is still my first patch, so I'm
>learning the ropes with the DCO and formatting.

No problem, I'm here if you need any help and feel free to cc me in 
any future patch.

>
>Changes in v2:
>- Use real name in Signed-off-by tag.
>- Fix commit message line wrapping and remove unnecessary blank lines.
>---
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>index fd3bae31b0ed..8ae3adecafd9 100644
>--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
>@@ -2429,7 +2429,7 @@ static int	cfg80211_rtw_dump_station(struct wiphy *wiphy,
> 	spin_lock_bh(&pstapriv->asoc_list_lock);
> 	psta = rtw_sta_info_get_by_idx(idx, pstapriv);
> 	spin_unlock_bh(&pstapriv->asoc_list_lock);
>-	if (psta == NULL) {
>+	if (!psta) {
> 		ret = -ENOENT;
> 		goto exit;
> 	}

LGTM,

Reviewed-by: Luka Gejak <luka.gejak@linux.dev>

Best regards,
Luka Gejak

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

end of thread, other threads:[~2026-04-27 19:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 18:42 [PATCH] staging: rtl8723bs: replace NULL comparison with NOT operator mgcvale
2026-04-24 13:39 ` Luka Gejak
2026-04-26 20:11 ` Greg KH
2026-04-27 19:37 ` [PATCH v2] " Miguel Cyrineu Vale
2026-04-27 19:50   ` Luka Gejak

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