From: "Michael S. Tsirkin" <mst@redhat.com>
To: kvm@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>,
virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] virtio: include asm/barrier explicitly
Date: Sun, 7 Jul 2013 17:21:20 +0300 [thread overview]
Message-ID: <20130707142120.GA2465@redhat.com> (raw)
In-Reply-To: <20130707142019.GA2447@redhat.com>
On Sun, Jul 07, 2013 at 05:20:19PM +0300, Michael S. Tsirkin wrote:
> virtio_ring.h uses mb() and friends, make
> it pull in asm/barrier.h itself, not rely
> on other headers to do it.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
In particular this fixes warnings during test build:
[linux]$ make -C tools/virtio/
make: Entering directory `/home/mst/scm/linux/tools/virtio'
cc -g -O2 -Wall -I. -I ../../usr/include/ -Wno-pointer-sign
-fno-strict-overflow -fno-strict-aliasing -fno-common -MMD
-U_FORTIFY_SOURCE -c -o virtio_test.o virtio_test.c
In file included from ./linux/virtio_ring.h:1:0,
from ../../usr/include/linux/vhost.h:17,
from virtio_test.c:14:
./linux/../../../include/linux/virtio_ring.h: In function ‘virtio_mb’:
./linux/../../../include/linux/virtio_ring.h:50:2: warning: implicit
declaration of function ‘mb’ [-Wimplicit-function-declaration]
> ---
> include/linux/virtio_ring.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h
> index ca3ad41..b300787 100644
> --- a/include/linux/virtio_ring.h
> +++ b/include/linux/virtio_ring.h
> @@ -1,6 +1,7 @@
> #ifndef _LINUX_VIRTIO_RING_H
> #define _LINUX_VIRTIO_RING_H
>
> +#include <asm/barrier.h>
> #include <linux/irqreturn.h>
> #include <uapi/linux/virtio_ring.h>
>
> --
> MST
next prev parent reply other threads:[~2013-07-07 14:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 14:20 [PATCH] virtio: include asm/barrier explicitly Michael S. Tsirkin
2013-07-07 14:21 ` Michael S. Tsirkin [this message]
2013-07-08 2:01 ` Rusty Russell
2013-07-08 5:33 ` Stephen Rothwell
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=20130707142120.GA2465@redhat.com \
--to=mst@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.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