Re: [PATCH v2] arm64: avoid -Woverride-init warning
From: Will Deacon
Date: Wed Oct 28 2020 - 18:21:41 EST
On Mon, 26 Oct 2020 20:37:46 +0100, Arnd Bergmann wrote:
> The icache_policy_str[] definition causes a warning when extra
> warning flags are enabled:
>
> arch/arm64/kernel/cpuinfo.c:38:26: warning: initialized field overwritten [-Woverride-init]
> 38 | [ICACHE_POLICY_VIPT] = "VIPT",
> | ^~~~~~
> arch/arm64/kernel/cpuinfo.c:38:26: note: (near initialization for 'icache_policy_str[2]')
> arch/arm64/kernel/cpuinfo.c:39:26: warning: initialized field overwritten [-Woverride-init]
> 39 | [ICACHE_POLICY_PIPT] = "PIPT",
> | ^~~~~~
> arch/arm64/kernel/cpuinfo.c:39:26: note: (near initialization for 'icache_policy_str[3]')
> arch/arm64/kernel/cpuinfo.c:40:27: warning: initialized field overwritten [-Woverride-init]
> 40 | [ICACHE_POLICY_VPIPT] = "VPIPT",
> | ^~~~~~~
> arch/arm64/kernel/cpuinfo.c:40:27: note: (near initialization for 'icache_policy_str[0]')
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/1] arm64: avoid -Woverride-init warning
https://git.kernel.org/arm64/c/332576e69a04
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev