From e523caa601f4a7c2fa1ecd040db921baf7453798 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 26 Aug 2015 10:42:26 +0930 Subject: tools/lguest: Fix redefinition of struct virtio_pci_cfg_cap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ours uses a u32 for the data, since we ensure it's always aligned and it's x86 so it doesn't matter anyway. lguest.c:128:8: error: redefinition of ‘struct virtio_pci_cfg_cap’ Signed-off-by: Rusty Russell Cc: Linus Torvalds Cc: Michael S. Tsirkin Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Fixes: 3121bb023e2db ("virtio: define virtio_pci_cfg_cap in header.") Signed-off-by: Ingo Molnar --- tools/lguest/lguest.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index e44052483ed9..80159e6811c2 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -125,7 +125,11 @@ struct device_list { /* The list of Guest devices, based on command line arguments. */ static struct device_list devices; -struct virtio_pci_cfg_cap { +/* + * Just like struct virtio_pci_cfg_cap in uapi/linux/virtio_pci.h, + * but uses a u32 explicitly for the data. + */ +struct virtio_pci_cfg_cap_u32 { struct virtio_pci_cap cap; u32 pci_cfg_data; /* Data for BAR access. */ }; @@ -157,7 +161,7 @@ struct pci_config { struct virtio_pci_notify_cap notify; struct virtio_pci_cap isr; struct virtio_pci_cap device; - struct virtio_pci_cfg_cap cfg_access; + struct virtio_pci_cfg_cap_u32 cfg_access; }; /* The device structure describes a single device. */ @@ -1291,7 +1295,7 @@ static struct device *dev_and_reg(u32 *reg) * only fault if they try to write with some invalid bar/offset/length. */ static bool valid_bar_access(struct device *d, - struct virtio_pci_cfg_cap *cfg_access) + struct virtio_pci_cfg_cap_u32 *cfg_access) { /* We only have 1 bar (BAR0) */ if (cfg_access->cap.bar != 0) -- cgit v1.2.3 From b51aa1cc7807f4dff7b70a762aa6d8814976d706 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 26 Aug 2015 10:42:27 +0930 Subject: tools/lguest: Clean up include dir It contains a symlinked header we use; ignore it and clean it up on 'make clean'. Signed-off-by: Rusty Russell Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- tools/lguest/.gitignore | 1 + tools/lguest/Makefile | 1 + 2 files changed, 2 insertions(+) (limited to 'tools') diff --git a/tools/lguest/.gitignore b/tools/lguest/.gitignore index 115587fd5f65..8d9a8383a52e 100644 --- a/tools/lguest/.gitignore +++ b/tools/lguest/.gitignore @@ -1 +1,2 @@ lguest +include diff --git a/tools/lguest/Makefile b/tools/lguest/Makefile index a107b5e4da13..d04599a79802 100644 --- a/tools/lguest/Makefile +++ b/tools/lguest/Makefile @@ -11,3 +11,4 @@ lguest: include/linux/virtio_types.h clean: rm -f lguest + rm -rf include -- cgit v1.2.3