From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Phillip Potter <phil@philpotter.co.uk>, gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, paskripkin@gmail.com,
straube.linux@gmail.com, martin@kaiser.cx,
abdun.nihaal@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: convert rtw_p2p_enable to correct error code semantics
Date: Thu, 4 Aug 2022 22:26:39 +0200 [thread overview]
Message-ID: <99ee7f1d-62fa-a873-403a-445d8d8b096a@gmail.com> (raw)
In-Reply-To: <20220802234408.930-1-phil@philpotter.co.uk>
On 8/3/22 01:44, Phillip Potter wrote:
> Convert the rtw_p2p_enable function to use correct error code semantics
> rather than _SUCCESS/_FAIL, and also make sure we allow these to be
> passed through properly in the one caller where we actually check the
> code, rtw_wext_p2p_enable.
>
> This change moves these functions to a clearer 'return 0;' style at the
> end of the function, and in the case of errors now returns ret instead
> of jumping to the end of the function, so that these can still be passed
> through but without using a goto to jump to a single return statement at
> the end which is less clear.
>
> This change moves the driver slowly closer to using standard error code
> semantics everywhere.
>
> Signed-off-by: Phillip Potter<phil@philpotter.co.uk>
> ---
> drivers/staging/r8188eu/core/rtw_p2p.c | 19 ++++++++-----------
> drivers/staging/r8188eu/os_dep/ioctl_linux.c | 12 +++++-------
> 2 files changed, 13 insertions(+), 18 deletions(-)
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
next prev parent reply other threads:[~2022-08-04 20:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-02 23:44 [PATCH] staging: r8188eu: convert rtw_p2p_enable to correct error code semantics Phillip Potter
2022-08-03 12:11 ` Dan Carpenter
2022-08-04 22:35 ` Phillip Potter
2022-08-04 20:26 ` Philipp Hortmann [this message]
2022-08-04 22:37 ` Phillip Potter
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=99ee7f1d-62fa-a873-403a-445d8d8b096a@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=abdun.nihaal@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=martin@kaiser.cx \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@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