From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>,
marcandre.lureau@redhat.com
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, d-tatianin@yandex-team.ru
Subject: Re: [PATCH 8/8] chardev/char: qemu_char_open(): add return value
Date: Sat, 29 Nov 2025 15:17:24 +0100 [thread overview]
Message-ID: <6546cd49-008a-492a-ac0a-5f63ac21e39e@linaro.org> (raw)
In-Reply-To: <20251129134350.487839-9-vsementsov@yandex-team.ru>
On 29/11/25 14:43, Vladimir Sementsov-Ogievskiy wrote:
> Accordingly with recommendations in include/qapi/error.h accompany
> errp by boolean return value and get rid of error propagation.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
> ---
> chardev/char.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
> - if (cc->chr_open) {
> - cc->chr_open(chr, backend, errp);
> + if (cc->chr_open && !cc->chr_open(chr, backend, errp)) {
> + return false;
> }
> +
> + return true;
> }
Alternatively:
if (!cc->chr_open) {
return true;
}
return cc->chr_open(chr, backend, errp);
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2025-11-29 14:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 13:43 [PATCH for-11.0 0/8] chardev: cleanup Vladimir Sementsov-Ogievskiy
2025-11-29 13:43 ` [PATCH 1/8] chardev: ChardevClass: consistent naming for handlers Vladimir Sementsov-Ogievskiy
2025-11-29 13:43 ` [PATCH 2/8] chardev: consistent naming for ChardevClass handlers implementations Vladimir Sementsov-Ogievskiy
2025-11-29 14:07 ` Philippe Mathieu-Daudé
2025-11-29 13:43 ` [PATCH 3/8] chardev: .chr_open(): drop be_opened parameter Vladimir Sementsov-Ogievskiy
2025-12-01 12:57 ` Marc-André Lureau
2025-12-04 13:34 ` Vladimir Sementsov-Ogievskiy
2025-11-29 13:43 ` [PATCH 4/8] chardev: .chr_open(): add boolean return value Vladimir Sementsov-Ogievskiy
2025-11-29 14:08 ` Philippe Mathieu-Daudé
2025-11-29 13:43 ` [PATCH 5/8] chardev/char-pty: store pty_name into PtyChardev state Vladimir Sementsov-Ogievskiy
2025-11-29 13:43 ` [PATCH 6/8] chardev: introduce .chr_get_pty_name() handler Vladimir Sementsov-Ogievskiy
2025-11-29 13:43 ` [PATCH 7/8] chardev: rework filename handling Vladimir Sementsov-Ogievskiy
2025-11-29 13:43 ` [PATCH 8/8] chardev/char: qemu_char_open(): add return value Vladimir Sementsov-Ogievskiy
2025-11-29 14:17 ` Philippe Mathieu-Daudé [this message]
2025-12-01 13:00 ` [PATCH for-11.0 0/8] chardev: cleanup Marc-André Lureau
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=6546cd49-008a-492a-ac0a-5f63ac21e39e@linaro.org \
--to=philmd@linaro.org \
--cc=d-tatianin@yandex-team.ru \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=vsementsov@yandex-team.ru \
/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).