From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v2 3/9] chardev/char: Improve ChardevClass::chr_write() docstring
Date: Tue, 28 Oct 2025 17:30:23 +0400 [thread overview]
Message-ID: <CAJ+F1CLcgEC-XoET_UPM3z2_T_AUi8T5rnj0dbN6BPeDLSmHhg@mail.gmail.com> (raw)
In-Reply-To: <20251022150743.78183-4-philmd@linaro.org>
Hi
On Wed, Oct 22, 2025 at 7:09 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> include/chardev/char.h | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/include/chardev/char.h b/include/chardev/char.h
> index b65e9981c14..d809bb316e9 100644
> --- a/include/chardev/char.h
> +++ b/include/chardev/char.h
> @@ -263,7 +263,16 @@ struct ChardevClass {
> void (*open)(Chardev *chr, ChardevBackend *backend,
> bool *be_opened, Error **errp);
>
> - /* write buf to the backend */
> + /**
> + * chr_write: Write data to a character backend
> + * @s: the character backend to write to
> + * @buf: the data to write
> + * @len: the number of bytes to write
> + *
> + * Called with chr_write_lock held.
> + *
> + * Returns: the number of bytes consumed or -1 on error.
you could add that "errno" is expected to be set in that case.
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> + */
> int (*chr_write)(Chardev *s, const uint8_t *buf, int len);
>
> /*
> --
> 2.51.0
>
>
--
Marc-André Lureau
next prev parent reply other threads:[~2025-10-28 13:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 15:07 [PATCH v2 0/9] chardev: Improve @docstring and clarify qemu_chr_write() uses Philippe Mathieu-Daudé
2025-10-22 15:07 ` [PATCH v2 1/9] chardev/char-fe: Improve @docstrings Philippe Mathieu-Daudé
2025-10-22 15:07 ` [PATCH v2 2/9] chardev/char-io: Add @docstrings for io_channel_send[_full]() Philippe Mathieu-Daudé
2025-10-22 15:07 ` [PATCH v2 3/9] chardev/char: Improve ChardevClass::chr_write() docstring Philippe Mathieu-Daudé
2025-10-28 13:30 ` Marc-André Lureau [this message]
2025-10-22 15:07 ` [PATCH v2 4/9] chardev/char: Document qemu_chr_write[_all]() Philippe Mathieu-Daudé
2025-10-28 13:32 ` Marc-André Lureau
2025-10-22 15:07 ` [PATCH v2 5/9] chardev/char-pty: Do not ignore chr_write() failures Philippe Mathieu-Daudé
2025-10-28 13:44 ` Marc-André Lureau
2025-10-22 15:07 ` [PATCH v2 6/9] chardev/char: Allow partial writes in qemu_chr_write() Philippe Mathieu-Daudé
2025-10-28 13:53 ` Marc-André Lureau
2025-10-22 15:07 ` [PATCH v2 7/9] chardev/char: Preserve %errno " Philippe Mathieu-Daudé
2025-10-22 15:14 ` Philippe Mathieu-Daudé
2025-10-28 14:25 ` Peter Maydell
2025-10-28 14:00 ` Marc-André Lureau
2025-10-28 14:19 ` Daniel P. Berrangé
2025-10-22 15:07 ` [PATCH v2 8/9] chardev/char-hub: Retry when qemu_chr_fe_write() can not write Philippe Mathieu-Daudé
2025-10-28 14:04 ` Marc-André Lureau
2025-10-22 15:07 ` [PATCH v2 9/9] hw/char: Simplify when qemu_chr_fe_write() could " Philippe Mathieu-Daudé
2025-10-28 14:07 ` Marc-André Lureau
2025-10-22 15:16 ` [PATCH v2 0/9] chardev: Improve @docstring and clarify qemu_chr_write() uses Philippe Mathieu-Daudé
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=CAJ+F1CLcgEC-XoET_UPM3z2_T_AUi8T5rnj0dbN6BPeDLSmHhg@mail.gmail.com \
--to=marcandre.lureau@gmail.com \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.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).