From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: Greg Kurz <groug@kaod.org>, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] 9pfs: Fix some return statements in the synth backend
Date: Sat, 26 Nov 2022 14:47:28 +0100 [thread overview]
Message-ID: <3230646.Re4ecU78SW@silver> (raw)
In-Reply-To: <166930551818.827792.10663674346122681963.stgit@bahia>
On Thursday, November 24, 2022 4:58:38 PM CET Greg Kurz wrote:
> The qemu_v9fs_synth_mkdir() and qemu_v9fs_synth_add_file() functions
> currently return a positive errno value on failure. This causes
> checkpatch.pl to spit several errors like the one below:
>
> ERROR: return of an errno should typically be -ve (return -EAGAIN)
> #79: FILE: hw/9pfs/9p-synth.c:79:
> + return EAGAIN;
>
> Simply change the sign. This has no consequence since callers
> assert() the returned value to be equal to 0.
>
> While here also get rid of the uneeded ret variables as suggested
> by return_directly.cocci.
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> hw/9pfs/9p-synth.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next
I would have expected more locations like that.
Thanks!
Best regards,
Christian Schoenebeck
next prev parent reply other threads:[~2022-11-26 13:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 15:58 [PATCH] 9pfs: Fix some return statements in the synth backend Greg Kurz
2022-11-26 13:47 ` Christian Schoenebeck [this message]
2022-11-28 7:35 ` Markus Armbruster
2022-11-28 9:37 ` Greg Kurz
2022-11-28 10:18 ` Markus Armbruster
2022-11-28 14:21 ` Christian Schoenebeck
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=3230646.Re4ecU78SW@silver \
--to=qemu_oss@crudebyte.com \
--cc=armbru@redhat.com \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).