qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, mrezanin@redhat.com, qemu-block@nongnu.org
Subject: Re: [PATCH 4/9] block/vpc: Make vpc_checksum() take void *
Date: Fri, 18 Dec 2020 11:54:28 +0100	[thread overview]
Message-ID: <6a870072-bccc-d7b9-5da5-acd9ecea62c7@redhat.com> (raw)
In-Reply-To: <20201217162003.1102738-5-armbru@redhat.com>

On 17.12.20 17:19, Markus Armbruster wrote:
> Some of the next commits will checksum structs.  Change vpc_checksum()
> to take void * instead of uint8_t, to save us pointless casts to
> uint8_t *.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   block/vpc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/block/vpc.c b/block/vpc.c
> index 34186640ee..5af9837806 100644
> --- a/block/vpc.c
> +++ b/block/vpc.c
> @@ -172,8 +172,9 @@ static QemuOptsList vpc_runtime_opts = {
>   
>   static QemuOptsList vpc_create_opts;
>   
> -static uint32_t vpc_checksum(uint8_t *buf, size_t size)
> +static uint32_t vpc_checksum(void *p, size_t size)
>   {
> +    uint8_t *buf = p;
>       uint32_t res = 0;
>       int i;

Using this opportunity to add consts would be nice, but not necessary:

Reviewed-by: Max Reitz <mreitz@redhat.com>



  reply	other threads:[~2020-12-18 11:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 16:19 [PATCH 0/9] block/vpc: Clean up some buffer abuse Markus Armbruster
2020-12-17 16:19 ` [PATCH 1/9] block/vpc: Make vpc_open() read the full dynamic header Markus Armbruster
2020-12-18 10:19   ` Max Reitz
2020-12-18 13:49     ` Markus Armbruster
2020-12-18 14:29       ` Max Reitz
2020-12-17 16:19 ` [PATCH 2/9] block/vpc: Don't abuse the footer buffer as BAT sector buffer Markus Armbruster
2020-12-18 10:30   ` Max Reitz
2020-12-17 16:19 ` [PATCH 3/9] block/vpc: Don't abuse the footer buffer for dynamic header Markus Armbruster
2020-12-18 10:52   ` Max Reitz
2020-12-18 13:52     ` Markus Armbruster
2020-12-17 16:19 ` [PATCH 4/9] block/vpc: Make vpc_checksum() take void * Markus Armbruster
2020-12-18 10:54   ` Max Reitz [this message]
2020-12-18 13:54     ` Markus Armbruster
2020-12-17 16:19 ` [PATCH 5/9] block/vpc: Pad VHDDynDiskHeader, replace uint8_t[] buffers Markus Armbruster
2020-12-18 11:04   ` Max Reitz
2020-12-17 16:20 ` [PATCH 6/9] block/vpc: Use sizeof() instead of 1024 for dynamic header size Markus Armbruster
2020-12-18 11:06   ` Max Reitz
2020-12-17 16:20 ` [PATCH 7/9] block/vpc: Pad VHDFooter, replace uint8_t[] buffers Markus Armbruster
2020-12-18 11:10   ` Max Reitz
2020-12-17 16:20 ` [PATCH 8/9] block/vpc: Pass footer buffers as VHDFooter * instead of uint8_t * Markus Armbruster
2020-12-18 11:12   ` Max Reitz
2020-12-17 16:20 ` [PATCH 9/9] block/vpc: Use sizeof() instead of HEADER_SIZE for footer size Markus Armbruster
2020-12-18 11:14   ` Max Reitz
2020-12-18 10:43 ` [PATCH 0/9] block/vpc: Clean up some buffer abuse Kevin Wolf

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=6a870072-bccc-d7b9-5da5-acd9ecea62c7@redhat.com \
    --to=mreitz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mrezanin@redhat.com \
    --cc=qemu-block@nongnu.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).