* [PATCH] staging: rtl8723bs: rename 'status' variable to 'ret' for consistency
@ 2026-03-14 16:56 Omer El Idrissi
2026-03-14 21:15 ` Ethan Tidmore
2026-03-16 8:38 ` Dan Carpenter
0 siblings, 2 replies; 3+ messages in thread
From: Omer El Idrissi @ 2026-03-14 16:56 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, Omer El Idrissi
The kernel commonly uses 'ret', 'retval', 'err' etc. for return value
tracking. No functional change intended beyond style and error handling
improvement.
Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index d664e254912c..dbcde683789d 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -345,7 +345,7 @@ static int rtw_drv_init(
struct sdio_func *func,
const struct sdio_device_id *id)
{
- int status = _FAIL;
+ int ret = _FAIL;
struct adapter *if1 = NULL;
struct dvobj_priv *dvobj;
@@ -358,25 +358,25 @@ static int rtw_drv_init(
goto free_dvobj;
/* dev_alloc_name && register_netdev */
- status = rtw_drv_register_netdev(if1);
- if (status != _SUCCESS)
+ ret = rtw_drv_register_netdev(if1);
+ if (ret != _SUCCESS)
goto free_if1;
- status = sdio_alloc_irq(dvobj);
- if (status != _SUCCESS)
+ ret = sdio_alloc_irq(dvobj);
+ if (ret != _SUCCESS)
goto free_if1;
- status = _SUCCESS;
+ ret = _SUCCESS;
free_if1:
- if (status != _SUCCESS && if1)
+ if (ret != _SUCCESS && if1)
rtw_sdio_if1_deinit(if1);
free_dvobj:
- if (status != _SUCCESS)
+ if (ret != _SUCCESS)
sdio_dvobj_deinit(func);
exit:
- return status == _SUCCESS ? 0 : -ENODEV;
+ return ret == _SUCCESS ? 0 : -ENODEV;
}
static void rtw_dev_remove(struct sdio_func *func)
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] staging: rtl8723bs: rename 'status' variable to 'ret' for consistency
2026-03-14 16:56 [PATCH] staging: rtl8723bs: rename 'status' variable to 'ret' for consistency Omer El Idrissi
@ 2026-03-14 21:15 ` Ethan Tidmore
2026-03-16 8:38 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Ethan Tidmore @ 2026-03-14 21:15 UTC (permalink / raw)
To: Omer El Idrissi, gregkh; +Cc: linux-staging, linux-kernel
On Sat Mar 14, 2026 at 11:56 AM CDT, Omer El Idrissi wrote:
> The kernel commonly uses 'ret', 'retval', 'err' etc. for return value
> tracking. No functional change intended beyond style and error handling
> improvement.
>
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
> ---
I think the code is fine as is.
Thanks,
ET
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: rtl8723bs: rename 'status' variable to 'ret' for consistency
2026-03-14 16:56 [PATCH] staging: rtl8723bs: rename 'status' variable to 'ret' for consistency Omer El Idrissi
2026-03-14 21:15 ` Ethan Tidmore
@ 2026-03-16 8:38 ` Dan Carpenter
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2026-03-16 8:38 UTC (permalink / raw)
To: Omer El Idrissi; +Cc: gregkh, linux-staging, linux-kernel
On Sat, Mar 14, 2026 at 05:56:00PM +0100, Omer El Idrissi wrote:
> The kernel commonly uses 'ret', 'retval', 'err' etc. for return value
> tracking. No functional change intended beyond style and error handling
> improvement.
>
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
> ---
> drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index d664e254912c..dbcde683789d 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -345,7 +345,7 @@ static int rtw_drv_init(
> struct sdio_func *func,
> const struct sdio_device_id *id)
> {
> - int status = _FAIL;
> + int ret = _FAIL;
status is actually better because these are non-standard error codes.
First fix that, then rename the variables to ret.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-16 8:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-14 16:56 [PATCH] staging: rtl8723bs: rename 'status' variable to 'ret' for consistency Omer El Idrissi
2026-03-14 21:15 ` Ethan Tidmore
2026-03-16 8:38 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox