From 19b02cf4ed955a260363a2416b57a2ff8b9996ad Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Mon, 4 Mar 2019 13:35:04 +0900 Subject: [PATCH] arm64_cpu_capabilities: flatten struct The midr_* part of the struct was never used, and confuses older gcc with partially uninitialized assignments that were not correct. Just flatten the struct Change-Id: I7a9cfe064ab97cdcd5ac50ce4fb713c4d7983bd3 --- arch/arm64/kernel/include/cpufeature.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/arch/arm64/kernel/include/cpufeature.h b/arch/arm64/kernel/include/cpufeature.h index 590c8dd1..07bf2547 100644 --- a/arch/arm64/kernel/include/cpufeature.h +++ b/arch/arm64/kernel/include/cpufeature.h @@ -67,21 +67,12 @@ struct arm64_cpu_capabilities { int def_scope;/* default scope */ int (*matches)(const struct arm64_cpu_capabilities *caps, int scope); int (*enable)(void *);/* Called on all active CPUs */ - union { - struct {/* To be used for erratum handling only */ - uint32_t midr_model; - uint32_t midr_range_min, midr_range_max; - }; - - struct {/* Feature register checking */ - uint32_t sys_reg; - uint8_t field_pos; - uint8_t min_field_value; - uint8_t hwcap_type; - int sign; - unsigned long hwcap; - }; - }; + uint32_t sys_reg; + uint8_t field_pos; + uint8_t min_field_value; + uint8_t hwcap_type; + int sign; + unsigned long hwcap; }; /* @ref.impl include/linux/bitops.h */