qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] io/channel: Have read/write functions take void * buffer argument
Date: Fri, 31 Oct 2025 14:55:59 +0100	[thread overview]
Message-ID: <78d871de-b64d-4073-a5a0-d9dcb2d9b31d@linaro.org> (raw)
In-Reply-To: <aQS_ULZEGQSPrM63@redhat.com>

On 31/10/25 14:53, Daniel P. Berrangé wrote:
> On Fri, Oct 31, 2025 at 10:13:51AM +0100, Philippe Mathieu-Daudé wrote:
>> I/O channel read/write functions can operate on any area of
>> memory, regardless of the content their represent. Do not
>> restrict to array of char, use the void* type, which is also
>> the type of the underlying iovec::iov_base field.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   include/crypto/tlssession.h |  4 ++--
>>   include/io/channel.h        | 14 +++++++-------
>>   io/channel-tls.c            |  4 ++--
>>   io/channel.c                | 14 +++++++-------
>>   4 files changed, 18 insertions(+), 18 deletions(-)
> 
> Also needs a change to tests:
> 
> 
> diff --git a/tests/unit/test-crypto-tlssession.c b/tests/unit/test-crypto-tlssession.c
> index d0baf3b304..0d06a6892e 100644
> --- a/tests/unit/test-crypto-tlssession.c
> +++ b/tests/unit/test-crypto-tlssession.c
> @@ -36,7 +36,7 @@
>   #define KEYFILE WORKDIR "key-ctx.pem"
>   
>   static ssize_t
> -testWrite(const char *buf, size_t len, void *opaque, Error **errp)
> +testWrite(const void *buf, size_t len, void *opaque, Error **errp)
>   {
>       int *fd = opaque;
>       int ret;
> @@ -54,7 +54,7 @@ testWrite(const char *buf, size_t len, void *opaque, Error **errp)
>   }
>   
>   static ssize_t
> -testRead(char *buf, size_t len, void *opaque, Error **errp)
> +testRead(void *buf, size_t len, void *opaque, Error **errp)
>   {
>       int *fd = opaque;
>       int ret;
> 
> 
> which I've made locally when queuing this patch, so no need to resend.

Oops, sorry and thanks for fixing up!


      reply	other threads:[~2025-10-31 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31  9:13 [PATCH] io/channel: Have read/write functions take void * buffer argument Philippe Mathieu-Daudé
2025-10-31 11:40 ` Daniel P. Berrangé
2025-10-31 13:53 ` Daniel P. Berrangé
2025-10-31 13:55   ` Philippe Mathieu-Daudé [this message]

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=78d871de-b64d-4073-a5a0-d9dcb2d9b31d@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --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).