diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2015-08-25 21:12:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-08-26 00:12:35 -0400 |
commit | e523caa601f4a7c2fa1ecd040db921baf7453798 (patch) | |
tree | 81ecc162cf52f91696e5a8a4ec5921c371ecff8b | |
parent | a782a7e46bb50822fabfeb7271605762a59c86df (diff) |
tools/lguest: Fix redefinition of struct virtio_pci_cfg_cap
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 <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Fixes: 3121bb023e2db ("virtio: define virtio_pci_cfg_cap in header.")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/lguest/lguest.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 { | |||
125 | /* The list of Guest devices, based on command line arguments. */ | 125 | /* The list of Guest devices, based on command line arguments. */ |
126 | static struct device_list devices; | 126 | static struct device_list devices; |
127 | 127 | ||
128 | struct virtio_pci_cfg_cap { | 128 | /* |
129 | * Just like struct virtio_pci_cfg_cap in uapi/linux/virtio_pci.h, | ||
130 | * but uses a u32 explicitly for the data. | ||
131 | */ | ||
132 | struct virtio_pci_cfg_cap_u32 { | ||
129 | struct virtio_pci_cap cap; | 133 | struct virtio_pci_cap cap; |
130 | u32 pci_cfg_data; /* Data for BAR access. */ | 134 | u32 pci_cfg_data; /* Data for BAR access. */ |
131 | }; | 135 | }; |
@@ -157,7 +161,7 @@ struct pci_config { | |||
157 | struct virtio_pci_notify_cap notify; | 161 | struct virtio_pci_notify_cap notify; |
158 | struct virtio_pci_cap isr; | 162 | struct virtio_pci_cap isr; |
159 | struct virtio_pci_cap device; | 163 | struct virtio_pci_cap device; |
160 | struct virtio_pci_cfg_cap cfg_access; | 164 | struct virtio_pci_cfg_cap_u32 cfg_access; |
161 | }; | 165 | }; |
162 | 166 | ||
163 | /* The device structure describes a single device. */ | 167 | /* The device structure describes a single device. */ |
@@ -1291,7 +1295,7 @@ static struct device *dev_and_reg(u32 *reg) | |||
1291 | * only fault if they try to write with some invalid bar/offset/length. | 1295 | * only fault if they try to write with some invalid bar/offset/length. |
1292 | */ | 1296 | */ |
1293 | static bool valid_bar_access(struct device *d, | 1297 | static bool valid_bar_access(struct device *d, |
1294 | struct virtio_pci_cfg_cap *cfg_access) | 1298 | struct virtio_pci_cfg_cap_u32 *cfg_access) |
1295 | { | 1299 | { |
1296 | /* We only have 1 bar (BAR0) */ | 1300 | /* We only have 1 bar (BAR0) */ |
1297 | if (cfg_access->cap.bar != 0) | 1301 | if (cfg_access->cap.bar != 0) |