From: Dan Carpenter <dan.carpenter@linaro.org>
To: Omer El Idrissi <omer.e.idrissi@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging: rtl8723bs: cleanup return in sdio_init()
Date: Wed, 25 Mar 2026 10:36:14 +0300 [thread overview]
Message-ID: <acOQbjNdDwLAGduo@stanley.mountain> (raw)
In-Reply-To: <20260324220453.47406-3-omer.e.idrissi@gmail.com>
On Tue, Mar 24, 2026 at 11:04:53PM +0100, Omer El Idrissi wrote:
> Make sdio_init() return errno from sdio_enable_func or
> sdio_set_block_size instead of _SUCCESS/_FAIL vendor-defined
> macros.
>
> Signed-off-by: Omer El Idrissi <omer.e.idrissi@gmail.com>
> ---
You're going to need to start labeling your patches as v2 etc.
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
> drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> index 358eac0837cf..01b5d8a70072 100644
> --- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> +++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
> @@ -131,9 +131,7 @@ static u32 sdio_init(struct dvobj_priv *dvobj)
> release:
> sdio_release_host(func);
>
> - if (err)
> - return _FAIL;
> - return _SUCCESS;
> + return err;
This patch isn't wrong, per se, but I'd really like for you to update
the callers as well like how you did in the earlier patch. Right now,
they're still testing for _SUCCESS.
Make sdio_dvobj_init() propagate the error code back instead of -1.
Change rtw_resume_process_normal() to:
ret = sdio_init();
if (ret)
goto whatever_and_return_NULL;
It will make the commit message a little bit more complicated.
Make sdio_init() propagate standard kernel error codes instead
of returning _SUCCESS/_FAIL. There are two callers for this
function. sdio_dvobj_init() already returns negative values
but the caller doesn't check for errors so changing this doesn't
affect anything. rtw_resume_process_normal() returns NULL on
error so leave that as-is.
Sorry, for being a bit nit-picky on this but you might end up potentially
sending a lot of these patches.
regards,
dan carpenter
next prev parent reply other threads:[~2026-03-25 7:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 22:04 [PATCH 0/2] rtl8723bs: clean up error handling Omer El Idrissi
2026-03-24 22:04 ` [PATCH 1/2] staging: rtl8723bs: use direct returns in sdio_dvobj_init() Omer El Idrissi
2026-03-24 22:04 ` [PATCH 2/2] staging: rtl8723bs: cleanup return in sdio_init() Omer El Idrissi
2026-03-25 7:36 ` Dan Carpenter [this message]
2026-03-25 18:51 ` Omer
2026-03-26 7:19 ` Dan Carpenter
2026-03-25 19:05 ` [PATCH v2 0/3] clean up error handling Omer El Idrissi
2026-03-25 19:05 ` [PATCH v2 1/3] staging: rtl8723bs: use direct returns in sdio_dvobj_init() Omer El Idrissi
2026-03-25 19:05 ` [PATCH v2 2/3] staging: rtl8723bs: cleanup return in sdio_init() Omer El Idrissi
2026-03-25 19:06 ` [PATCH v2 3/3] staging: rtl8723bs: clean up callees for sdio_init function Omer El Idrissi
2026-03-26 8:16 ` [PATCH v3 0/4] clean up error handling Omer El Idrissi
2026-03-26 8:16 ` [PATCH v3 1/4] staging: rtl8723bs: use direct returns in sdio_dvobj_init() Omer El Idrissi
2026-03-26 8:16 ` [PATCH v3 2/4] staging: rtl8723bs: cleanup return in sdio_init() Omer El Idrissi
2026-03-26 8:16 ` [PATCH v3 3/4] staging: rtl8723bs: clean up callees for sdio_init function Omer El Idrissi
2026-03-26 8:16 ` [PATCH v3 4/4] staging: rtl8723bs: Choose slightly more readable error check Omer El Idrissi
2026-03-26 8:39 ` [PATCH v3 0/4] clean up error handling Dan Carpenter
2026-03-26 10:36 ` Greg KH
2026-03-26 11:10 ` Omer
2026-03-26 14:49 ` Greg KH
2026-03-26 8:18 ` Omer El Idrissi
2026-03-26 8:18 ` [PATCH v3 1/4] staging: rtl8723bs: use direct returns in sdio_dvobj_init() Omer El Idrissi
2026-03-26 8:18 ` [PATCH v3 2/4] staging: rtl8723bs: cleanup return in sdio_init() Omer El Idrissi
2026-03-26 8:18 ` [PATCH v3 3/4] staging: rtl8723bs: clean up callees for sdio_init function Omer El Idrissi
2026-03-26 8:18 ` [PATCH v3 4/4] staging: rtl8723bs: Choose slightly more readable error check Omer El Idrissi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=acOQbjNdDwLAGduo@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=omer.e.idrissi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox