diff options
| author | Sean Christopherson <[email protected]> | 2025-06-24 23:19:30 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2025-08-20 15:04:09 +0000 |
| commit | dce1b33ed7430c7189b8cc1567498f9e6bf12731 (patch) | |
| tree | 7b7e60e5defb64a7b3dab5f808bf2b6ea6baee0d /drivers/cdx/controller/cdx_controller.c | |
| parent | KVM: SEV: don't check have_run_cpus in sev_writeback_caches() (diff) | |
| download | kernel-dce1b33ed7430c7189b8cc1567498f9e6bf12731.tar.gz kernel-dce1b33ed7430c7189b8cc1567498f9e6bf12731.zip | |
selftests: harness: Rename is_signed_type() to avoid collision with overflow.h
Rename is_signed_type() to is_signed_var() to avoid colliding with a macro
of the same name defined by tools' linux/overflow.h. This fixes warnings
(and presumably potential test failures) in tests that utilize the
selftests harness and happen to (indirectly) include overflow.h.
In file included from tools/include/linux/bits.h:34,
from tools/include/linux/bitops.h:14,
from tools/include/linux/hashtable.h:13,
from include/kvm_util.h:11,
from x86/userspace_msr_exit_test.c:11:
tools/include/linux/overflow.h:31:9: error: "is_signed_type" redefined [-Werror]
31 | #define is_signed_type(type) (((type)(-1)) < (type)1)
| ^~~~~~~~~~~~~~
In file included from include/kvm_test_harness.h:11,
from x86/userspace_msr_exit_test.c:9:
../kselftest_harness.h:754:9: note: this is the location of the previous definition
754 | #define is_signed_type(var) (!!(((__typeof__(var))(-1)) < (__typeof__(var))1))
| ^~~~~~~~~~~~~~
Use a separate definition, at least for now, as many selftests build
without tools/include in their include path.
Fixes: fc92099902fb ("tools headers: Synchronize linux/bits.h with the kernel sources")
Cc: Vincent Mailhol <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
0 files changed, 0 insertions, 0 deletions
