All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: Peter Krempa <pkrempa@redhat.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Hanna Reitz <hreitz@redhat.com>,
	qemu-block@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH] block/blkio: Fix inclusion of required headers
Date: Mon, 23 Jan 2023 15:02:15 -0500	[thread overview]
Message-ID: <Y87nx8rF8gVOg+BW@fedora> (raw)
In-Reply-To: <2bc956011404a1ab03342aefde0087b5b4762562.1674477350.git.pkrempa@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2444 bytes --]

On Mon, Jan 23, 2023 at 01:39:27PM +0100, Peter Krempa wrote:
> After recent header file inclusion rework the build fails when the blkio
> module is enabled:
> 
> ../block/blkio.c: In function ‘blkio_detach_aio_context’:
> ../block/blkio.c:321:24: error: implicit declaration of function ‘bdrv_get_aio_context’; did you mean ‘qemu_get_aio_context’? [-Werror=implicit-function-declaration]
>   321 |     aio_set_fd_handler(bdrv_get_aio_context(bs),
>       |                        ^~~~~~~~~~~~~~~~~~~~
>       |                        qemu_get_aio_context
> ../block/blkio.c:321:24: error: nested extern declaration of ‘bdrv_get_aio_context’ [-Werror=nested-externs]
> ../block/blkio.c:321:24: error: passing argument 1 of ‘aio_set_fd_handler’ makes pointer from integer without a cast [-Werror=int-conversion]
>   321 |     aio_set_fd_handler(bdrv_get_aio_context(bs),
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~~
>       |                        |
>       |                        int
> In file included from /home/pipo/git/qemu.git/include/qemu/job.h:33,
>                  from /home/pipo/git/qemu.git/include/block/blockjob.h:30,
>                  from /home/pipo/git/qemu.git/include/block/block_int-global-state.h:28,
>                  from /home/pipo/git/qemu.git/include/block/block_int.h:27,
>                  from ../block/blkio.c:13:
> /home/pipo/git/qemu.git/include/block/aio.h:476:37: note: expected ‘AioContext *’ but argument is of type ‘int’
>   476 | void aio_set_fd_handler(AioContext *ctx,
>       |                         ~~~~~~~~~~~~^~~
> ../block/blkio.c: In function ‘blkio_file_open’:
> ../block/blkio.c:821:34: error: passing argument 2 of ‘blkio_attach_aio_context’ makes pointer from integer without a cast [-Werror=int-conversion]
>   821 |     blkio_attach_aio_context(bs, bdrv_get_aio_context(bs));
>       |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
>       |                                  |
>       |                                  int
> 
> Fix it by including 'block/block-io.h' which contains the required
> declarations.
> 
> Fixes: e2c1c34f139f49ef909bb4322607fb8b39002312
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>  block/blkio.c | 2 ++
>  1 file changed, 2 insertions(+)

Thanks, applied to my block-next tree:
https://gitlab.com/stefanha/qemu/commits/block-next

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2023-01-23 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 12:39 [PATCH] block/blkio: Fix inclusion of required headers Peter Krempa
2023-01-23 14:01 ` Markus Armbruster
2023-01-23 14:14   ` Peter Krempa
2023-01-23 20:02 ` Stefan Hajnoczi [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=Y87nx8rF8gVOg+BW@fedora \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pkrempa@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 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.