mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: use unsigned int in HAL interface
@ 2026-09-26 12:51 Artem Shelenko
  2026-09-26 12:59 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Artem Shelenko @ 2026-09-26 12:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-staging, linux-kernel

The rtl8723bs TODO asks to convert remaining unusual variable types.

Replace uses of the uint typedef with unsigned int in rtw_hal_init()
and rtw_hal_deinit(), including their local status variables and
declarations. uint is a typedef for unsigned int, so this does not
change behavior.

Assisted-by: LLM
Signed-off-by: Artem Shelenko <Artem.Shelenko@gmail.com>
---
 drivers/staging/rtl8723bs/hal/hal_intf.c     | 8 ++++----
 drivers/staging/rtl8723bs/include/hal_intf.h | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 1443875d1..67b21b777 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -27,9 +27,9 @@ static void rtw_hal_init_opmode(struct adapter *padapter)
 	rtw_setopmode_cmd(padapter, networkType, false);
 }
 
-uint rtw_hal_init(struct adapter *padapter)
+unsigned int rtw_hal_init(struct adapter *padapter)
 {
-	uint status;
+	unsigned int status;
 	struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
 
 	status = rtl8723bs_hal_init(padapter);
@@ -54,9 +54,9 @@ uint rtw_hal_init(struct adapter *padapter)
 	return status;
 }
 
-uint rtw_hal_deinit(struct adapter *padapter)
+unsigned int rtw_hal_deinit(struct adapter *padapter)
 {
-	uint status = _SUCCESS;
+	unsigned int status = _SUCCESS;
 	struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
 
 	status = rtl8723bs_hal_deinit(padapter);
diff --git a/drivers/staging/rtl8723bs/include/hal_intf.h b/drivers/staging/rtl8723bs/include/hal_intf.h
index 7b6311652..b43a9c86a 100644
--- a/drivers/staging/rtl8723bs/include/hal_intf.h
+++ b/drivers/staging/rtl8723bs/include/hal_intf.h
@@ -175,8 +175,8 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
 #define	RX_PNOWakeUp			0x55
 #define	AP_WakeUp			0x66
 
-uint rtw_hal_init(struct adapter *padapter);
-uint rtw_hal_deinit(struct adapter *padapter);
+unsigned int rtw_hal_init(struct adapter *padapter);
+unsigned int rtw_hal_deinit(struct adapter *padapter);
 void rtw_hal_stop(struct adapter *padapter);
 void rtw_hal_set_hwreg(struct adapter *padapter, u8 variable, u8 *val);
 void rtw_hal_get_hwreg(struct adapter *padapter, u8 variable, u8 *val);

base-commit: 8444548bd905f22093729065408284a6b46f7eee
-- 
2.43.0


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

* Re: [PATCH] staging: rtl8723bs: use unsigned int in HAL interface
  2026-09-26 12:51 [PATCH] staging: rtl8723bs: use unsigned int in HAL interface Artem Shelenko
@ 2026-09-26 12:59 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-09-26 12:59 UTC (permalink / raw)
  To: Artem Shelenko; +Cc: Greg Kroah-Hartman, linux-staging, linux-kernel

On Sat, Sep 26, 2026 at 03:51:50PM +0300, Artem Shelenko wrote:
> The rtl8723bs TODO asks to convert remaining unusual variable types.
> 
> Replace uses of the uint typedef with unsigned int in rtw_hal_init()
> and rtw_hal_deinit(), including their local status variables and
> declarations. uint is a typedef for unsigned int, so this does not
> change behavior.
> 

This sort of patch isn't the correct thing.  These functions should
be changed to return zero on success and standard negative error codes
on failure.

It's actually a good thing when bad code looks bad because then there
are tools which complain about it and it motivates people to fix it
correctly.  That's the whole point of static checkers to complain about
bad code, so we're working against ourselves by silencing the checkers.

regards,
dan carpenter


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

end of thread, other threads:[~2026-09-26 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-26 12:51 [PATCH] staging: rtl8723bs: use unsigned int in HAL interface Artem Shelenko
2026-09-26 12:59 ` Dan Carpenter

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®