[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] 9pfs: Fix some return statements in the synth backend
|
From: |
Christian Schoenebeck |
|
Subject: |
Re: [PATCH] 9pfs: Fix some return statements in the synth backend |
|
Date: |
Sat, 26 Nov 2022 14:47:28 +0100 |
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