virtio: include asm/barrier explicitly
Subsystems (2)
Michael S. Tsirkin
maintainerPATCH 1/1 virtio: include asm/barrier explicitly
virtio_ring.h uses mb() and friends, make
it pull in asm/barrier.h itself, not rely
on other headers to do it.
--- include/linux/virtio_ring.h | 1 + 1 file changed, 1 insertion(+)
include/linux/virtio_ring.h +1 -0
@@ -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>
Signature · 1 line
MST
Michael S. Tsirkin
maintainerQuoted 5 lines · Michael S. Tsirkin
virtio_ring.husesmb()and friends, make
it pull inasm/barrier.hitself, not rely
on other headers to do it.Signed-off-by Michael S. Tsirkin <[email protected]>
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]
Quoted 18 lines
--- include/linux/virtio_ring.h | 1 + 1 file changed, 1 insertion(+)include/linux/virtio_ring.h +1
-0@@ -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> Signature · 1 line
MST
Rusty Russell
AppliedQuoted 5 lines · Michael S. Tsirkin
virtio_ring.husesmb()and friends, make
it pull inasm/barrier.hitself, not rely
on other headers to do it.Signed-off-by Michael S. Tsirkin <[email protected]>
Applied.
Thanks,
Rusty.
PS. I'll squeeze these into this merge window, since they're trivial.
Hi Rusty,
Quoted 2 lines · On Mon, 08 Jul 2013 11:31:45 +0930 Rusty Russell <[email protected]> wrote:
PS. I'll squeeze these into this merge window, since they're trivial.
s/'re trivial/fix bugs/ ;-)
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization