All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
	qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH-for-8.1 2/5] block/dmg: Remove duplicated prototype declarations
Date: Mon, 20 Mar 2023 13:50:53 +0000	[thread overview]
Message-ID: <ZBhkvQ1xt1m9VRJM@redhat.com> (raw)
In-Reply-To: <20230320134219.22489-3-philmd@linaro.org>

On Mon, Mar 20, 2023 at 02:42:16PM +0100, Philippe Mathieu-Daudé wrote:
> Both dmg_uncompress_bz2 / dmg_uncompress_lzfse are declared
> in "dmg.h", included 1 line before.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  block/dmg.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/block/dmg.c b/block/dmg.c
> index e10b9a2ba5..a5d22fb8f9 100644
> --- a/block/dmg.c
> +++ b/block/dmg.c
> @@ -31,12 +31,6 @@
>  #include "qemu/memalign.h"
>  #include "dmg.h"
>  
> -int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
> -                          char *next_out, unsigned int avail_out);
> -
> -int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
> -                            char *next_out, unsigned int avail_out);

These aren't prototypes, they are variables that hold a funtion
pointer. The header has them as 'extern' to avoid the variables
being instantiated more than once if the header is included many
times. This code is correct as-is, and so this change is not
desirable.

> -
>  enum {
>      /* Limit chunk sizes to prevent unreasonable amounts of memory being used
>       * or truncating when converting to 32-bit types
> -- 
> 2.38.1
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


  reply	other threads:[~2023-03-20 13:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 13:42 [PATCH-for-8.1 0/5] bulk: Do not declare function prototypes using 'extern' keyword Philippe Mathieu-Daudé
2023-03-20 13:42 ` [PATCH-for-8.1 1/5] qemu/osdep.h: Do not declare function prototypes using extern keyword Philippe Mathieu-Daudé
2023-03-20 13:42 ` [PATCH-for-8.1 2/5] block/dmg: Remove duplicated prototype declarations Philippe Mathieu-Daudé
2023-03-20 13:50   ` Daniel P. Berrangé [this message]
2023-03-20 13:42 ` [PATCH-for-8.1 3/5] qemu/uri: Use QueryParams type definition Philippe Mathieu-Daudé
2023-03-20 13:42 ` [PATCH-for-8.1 4/5] bulk: Do not declare function prototypes using extern keyword Philippe Mathieu-Daudé
2023-03-20 13:48   ` Daniel P. Berrangé
2023-03-20 14:23     ` Philippe Mathieu-Daudé
2023-03-20 13:42 ` [PATCH-for-8.1 5/5] bulk: Replace __attribute__((noreturn)) -> G_NORETURN Philippe Mathieu-Daudé
2023-03-21 12:56   ` Juan Quintela

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=ZBhkvQ1xt1m9VRJM@redhat.com \
    --to=berrange@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.