[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH for-4.14] x86/cpu: fix build with clang 3.5
On 02/06/2020 10:05, Roger Pau Monne wrote: > Clang 3.5 complains with: > > common.c:794:24: error: statement expression not allowed at file scope > i < ARRAY_SIZE(this_cpu(tss_page).ist_ssp); ++i ) > ^ > /build/xen/include/asm/percpu.h:14:7: note: expanded from macro 'this_cpu' > (*RELOC_HIDE(&per_cpu__##var, get_cpu_info()->per_cpu_offset)) > ^ > /build/xen/include/xen/compiler.h:104:3: note: expanded from macro > 'RELOC_HIDE' > ({ unsigned long __ptr; \ > ^ > /build/xen/include/xen/lib.h:68:69: note: expanded from macro 'ARRAY_SIZE' > #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]) + __must_be_array(x)) > ^ > /build/xen/include/xen/compiler.h:85:57: note: expanded from macro > '__must_be_array' > BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0]))) > ^ > /build/xen/include/xen/lib.h:39:57: note: expanded from macro > 'BUILD_BUG_ON_ZERO' > #define BUILD_BUG_ON_ZERO(cond) sizeof(struct { int:-!!(cond); }) > ^ > > Workaround this by defining the tss_page as a local variable. Adjust > other users of the per-cpu tss_page to also use the newly introduced > local variable. > > No functional change expected. > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Sorry for more carnage. Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |