From: Michael Mueller <mimu@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: Michael Mueller <mimu@linux.ibm.com>,
linux-s390@vger.kernel.org,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Christoph Schlameuss <schlameuss@linux.ibm.com>,
Janosch Frank <frankja@linux.ibm.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [RFC PATCH] KVM: s390: selftests: work around macro is_signed_type re-definiton
Date: Tue, 22 Jul 2025 17:53:55 +0200 [thread overview]
Message-ID: <20250722155358.111810-1-mimu@linux.ibm.com> (raw)
The following commit creates a pre-processor warning during the KVM
selftest build as it leads to a re-definition of macro is_signed_type().
commit fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources")
$ make -C tools/testing/selftests TARGETS="kvm" all >/dev/null
In file included from s390/ucontrol_test.c:11:
../kselftest_harness.h:754:9: warning: ‘is_signed_type’ redefined
754 | #define is_signed_type(var) (!!(((__typeof__(var))(-1)) < (__typeof__(var))1))
| ^~~~~~~~~~~~~~
In file included from ./linux/tools/testing/selftests/../../../tools/include/linux/bits.h:34,
from ./linux/tools/testing/selftests/../../../tools/include/linux/bitops.h:14,
from ./linux/tools/testing/selftests/../../../tools/include/linux/hashtable.h:13,
from include/kvm_util.h:11,
from include/s390/debug_print.h:15,
from s390/ucontrol_test.c:10:
./linux/tools/testing/selftests/../../../tools/include/linux/overflow.h:31:9: note: this is the location of the previous definition
31 | #define is_signed_type(type) (((type)(-1)) < (type)1)
| ^~~~~~~~~~~~~~
cc1: note: unrecognized command-line option ‘-Wno-gnu-variable-sized-type-not-at-end’ may have been intended to silence earlier diagnostics
A fix resolving this issue outside this kvm selftest would be preferred.
Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
---
tools/testing/selftests/kvm/s390/ucontrol_test.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/testing/selftests/kvm/s390/ucontrol_test.c b/tools/testing/selftests/kvm/s390/ucontrol_test.c
index d265b34c54be..d1258c1568db 100644
--- a/tools/testing/selftests/kvm/s390/ucontrol_test.c
+++ b/tools/testing/selftests/kvm/s390/ucontrol_test.c
@@ -8,6 +8,16 @@
* Christoph Schlameuss <schlameuss@linux.ibm.com>
*/
#include "debug_print.h"
+
+/*
+ * header debug_print.h leaves macro is_signed_type()
+ * behind which is defined in "linux/overflow.h"
+ * header "kselftest_harness.h" re-defines it.
+ */
+#ifdef is_signed_type
+#undef is_signed_type
+#endif
+
#include "kselftest_harness.h"
#include "kvm_util.h"
#include "processor.h"
--
2.50.1
reply other threads:[~2025-07-22 16:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250722155358.111810-1-mimu@linux.ibm.com \
--to=mimu@linux.ibm.com \
--cc=acme@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=schlameuss@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).