Linux Framebuffer Layer development
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: style cleanups for sm750fb and rtl8723bs
@ 2026-01-07  9:47 Lorenzo Simonelli
  2026-01-07  9:47 ` [PATCH 1/3] staging: sm750fb: fix static const char array warning Lorenzo Simonelli
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lorenzo Simonelli @ 2026-01-07  9:47 UTC (permalink / raw)
  To: gregkh
  Cc: sudipm.mukherjee, teddy.wang, linux-staging, linux-kernel,
	linux-fbdev, Lorenzo Simonelli

This patch series performs various style cleanups in the staging
directory to resolve warnings reported by checkpatch.pl.

The changes include:
- Fixing 'static const char * const' declarations in sm750fb.
- Removing trailing whitespace in rtw_mlme.c.
- Simplifying boolean expressions by removing unnecessary parentheses
  and explicit comparisons to 'true'.

All patches have been checked with checkpatch.pl and the modified 
files have been verified to compile correctly.

Lorenzo Simonelli (3):
  staging: sm750fb: fix static const char array warning
  staging: rtl8723bs: remove trailing whitespace
  staging: rtl8723bs: remove unnecessary parentheses and true comparisons

 drivers/staging/rtl8723bs/core/rtw_mlme.c | 14 +++++++-------
 drivers/staging/sm750fb/sm750.c           |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.52.0

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

* [PATCH 1/3] staging: sm750fb: fix static const char array warning
  2026-01-07  9:47 [PATCH 0/3] staging: style cleanups for sm750fb and rtl8723bs Lorenzo Simonelli
@ 2026-01-07  9:47 ` Lorenzo Simonelli
  2026-01-11 12:58   ` Greg KH
  2026-01-07  9:47 ` [PATCH 2/3] staging: rtl8723bs: remove trailing whitespace Lorenzo Simonelli
  2026-01-07  9:47 ` [PATCH 3/3] staging: rtl8723bs: remove unnecessary parentheses and true comparisons Lorenzo Simonelli
  2 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Simonelli @ 2026-01-07  9:47 UTC (permalink / raw)
  To: gregkh
  Cc: sudipm.mukherjee, teddy.wang, linux-staging, linux-kernel,
	linux-fbdev, Lorenzo Simonelli

Fix the checkpatch.pl warning: "static const char * array should
probably be static const char * const" by adding the missing
const modifier.

Signed-off-by: Lorenzo Simonelli <lorenzosimonelli02@gmail.com>
---
 drivers/staging/sm750fb/sm750.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index fecd7457e..15b5de33b 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -33,7 +33,7 @@
 static int g_hwcursor = 1;
 static int g_noaccel;
 static int g_nomtrr;
-static const char *g_fbmode[] = {NULL, NULL};
+static const char * const g_fbmode[] = {NULL, NULL};
 static const char *g_def_fbmode = "1024x768-32@60";
 static char *g_settings;
 static int g_dualview;
-- 
2.52.0


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

* [PATCH 2/3] staging: rtl8723bs: remove trailing whitespace
  2026-01-07  9:47 [PATCH 0/3] staging: style cleanups for sm750fb and rtl8723bs Lorenzo Simonelli
  2026-01-07  9:47 ` [PATCH 1/3] staging: sm750fb: fix static const char array warning Lorenzo Simonelli
@ 2026-01-07  9:47 ` Lorenzo Simonelli
  2026-01-07  9:47 ` [PATCH 3/3] staging: rtl8723bs: remove unnecessary parentheses and true comparisons Lorenzo Simonelli
  2 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Simonelli @ 2026-01-07  9:47 UTC (permalink / raw)
  To: gregkh
  Cc: sudipm.mukherjee, teddy.wang, linux-staging, linux-kernel,
	linux-fbdev, Lorenzo Simonelli

Remove a trailing whitespace found by checkpatch.pl in rtw_mlme.c
at line 2021.

Signed-off-by: Lorenzo Simonelli <lorenzosimonelli02@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 98704179a..ff4e668f1 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2018,7 +2018,7 @@ int rtw_restruct_wmm_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_
 	return ielength;
 }
 
-/* Ported from 8185: IsInPreAuthKeyList(). 
+/* Ported from 8185: IsInPreAuthKeyList().
  * (Renamed from SecIsInPreAuthKeyList(), 2006-10-13.)
  * Added by Annie, 2006-05-07.
  *
-- 
2.52.0


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

* [PATCH 3/3] staging: rtl8723bs: remove unnecessary parentheses and true comparisons
  2026-01-07  9:47 [PATCH 0/3] staging: style cleanups for sm750fb and rtl8723bs Lorenzo Simonelli
  2026-01-07  9:47 ` [PATCH 1/3] staging: sm750fb: fix static const char array warning Lorenzo Simonelli
  2026-01-07  9:47 ` [PATCH 2/3] staging: rtl8723bs: remove trailing whitespace Lorenzo Simonelli
@ 2026-01-07  9:47 ` Lorenzo Simonelli
  2 siblings, 0 replies; 5+ messages in thread
From: Lorenzo Simonelli @ 2026-01-07  9:47 UTC (permalink / raw)
  To: gregkh
  Cc: sudipm.mukherjee, teddy.wang, linux-staging, linux-kernel,
	linux-fbdev, Lorenzo Simonelli

Clean up unnecessary double parentheses and explicit comparisons to
true in rtw_mlme.c. This improves readability and adheres to the
Linux kernel coding style

Signed-off-by: Lorenzo Simonelli <lorenzosimonelli02@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index ff4e668f1..d9e6778e1 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -468,11 +468,11 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
 		&pmlmepriv->cur_network.network,
 		&pmlmepriv->cur_network.network,
 		&pmlmepriv->cur_network.network);
-
-	if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) && (is_same_network(&pmlmepriv->cur_network.network, pnetwork, 0))) {
+	if ((check_fwstate(pmlmepriv, _FW_LINKED) == true) &&
+	    (is_same_network(&pmlmepriv->cur_network.network, pnetwork, 0))) {
 		update_network(&pmlmepriv->cur_network.network, pnetwork, adapter, true);
 		rtw_update_protection(adapter, (pmlmepriv->cur_network.network.ies) + sizeof(struct ndis_802_11_fix_ie),
-								pmlmepriv->cur_network.network.ie_length);
+				      pmlmepriv->cur_network.network.ie_length);
 	}
 }
 
@@ -710,7 +710,7 @@ void rtw_surveydone_event_callback(struct adapter	*adapter, u8 *pbuf)
 	rtw_set_signal_stat_timer(&adapter->recvpriv);
 
 	if (pmlmepriv->to_join) {
-		if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) {
+		if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
 			if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
 				set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
 
@@ -1386,8 +1386,8 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
 
 	spin_lock_bh(&pmlmepriv->lock);
 
-	if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == true) ||
-		(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) {
+	if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ||
+	    check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
 		if (adapter->stapriv.asoc_sta_count == 2) {
 			spin_lock_bh(&pmlmepriv->scanned_queue.lock);
 			ptarget_wlan = rtw_find_network(&pmlmepriv->scanned_queue, cur_network->network.mac_address);
-- 
2.52.0


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

* Re: [PATCH 1/3] staging: sm750fb: fix static const char array warning
  2026-01-07  9:47 ` [PATCH 1/3] staging: sm750fb: fix static const char array warning Lorenzo Simonelli
@ 2026-01-11 12:58   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2026-01-11 12:58 UTC (permalink / raw)
  To: Lorenzo Simonelli
  Cc: sudipm.mukherjee, teddy.wang, linux-staging, linux-kernel,
	linux-fbdev

On Wed, Jan 07, 2026 at 10:47:12AM +0100, Lorenzo Simonelli wrote:
> Fix the checkpatch.pl warning: "static const char * array should
> probably be static const char * const" by adding the missing
> const modifier.
> 
> Signed-off-by: Lorenzo Simonelli <lorenzosimonelli02@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index fecd7457e..15b5de33b 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -33,7 +33,7 @@
>  static int g_hwcursor = 1;
>  static int g_noaccel;
>  static int g_nomtrr;
> -static const char *g_fbmode[] = {NULL, NULL};
> +static const char * const g_fbmode[] = {NULL, NULL};
>  static const char *g_def_fbmode = "1024x768-32@60";
>  static char *g_settings;
>  static int g_dualview;
> -- 
> 2.52.0
> 

Please ALWAYS test-build your patches before sending them out.  That way
you catch obvious bugs like the one that this change introduces :(

thanks,

greg k-h

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

end of thread, other threads:[~2026-01-11 12:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07  9:47 [PATCH 0/3] staging: style cleanups for sm750fb and rtl8723bs Lorenzo Simonelli
2026-01-07  9:47 ` [PATCH 1/3] staging: sm750fb: fix static const char array warning Lorenzo Simonelli
2026-01-11 12:58   ` Greg KH
2026-01-07  9:47 ` [PATCH 2/3] staging: rtl8723bs: remove trailing whitespace Lorenzo Simonelli
2026-01-07  9:47 ` [PATCH 3/3] staging: rtl8723bs: remove unnecessary parentheses and true comparisons Lorenzo Simonelli

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