Message ID | 1485534415-20887-1-git-send-email-mst@redhat.com |
---|---|
State | New |
Headers | show |
On 27 January 2017 at 16:27, Michael S. Tsirkin <mst@redhat.com> wrote: > stub version of MISMATCH_CHECK is empty so it's easy to misuse for > people not building kvm on arm. Use QEMU_BUILD_BUG_ON similar to the > non-stub version to make it easier to catch bugs. > > Signed-off-by: Michael S. Tsirkin <mst@redhat.com> > --- > target/arm/kvm-consts.h | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/target/arm/kvm-consts.h b/target/arm/kvm-consts.h > index a2c9518..06b6c92 100644 > --- a/target/arm/kvm-consts.h > +++ b/target/arm/kvm-consts.h > @@ -21,7 +21,9 @@ > #define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(X != Y) > > #else > -#define MISMATCH_CHECK(X, Y) > + > +#define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(0) > + > #endif > > #define CP_REG_SIZE_SHIFT 52 Reviewed-by: Peter Maydell <peter.maydell@linaro.org> thanks -- PMM
diff --git a/target/arm/kvm-consts.h b/target/arm/kvm-consts.h index a2c9518..06b6c92 100644 --- a/target/arm/kvm-consts.h +++ b/target/arm/kvm-consts.h @@ -21,7 +21,9 @@ #define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(X != Y) #else -#define MISMATCH_CHECK(X, Y) + +#define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(0) + #endif #define CP_REG_SIZE_SHIFT 52
stub version of MISMATCH_CHECK is empty so it's easy to misuse for people not building kvm on arm. Use QEMU_BUILD_BUG_ON similar to the non-stub version to make it easier to catch bugs. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- target/arm/kvm-consts.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)