[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a16zU7CRJniQHKi4Qeie2+jAs52HoYX9tgK2j5hb4HtMg@mail.gmail.com>
Date: Mon, 26 Oct 2020 20:30:43 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Will Deacon <will.deacon@....com>,
Marc Zyngier <maz@...nel.org>,
James Morse <james.morse@....com>,
Anshuman Khandual <anshuman.khandual@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Steven Price <steven.price@....com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] arm64: avoid -Woverride-init warning
On Mon, Oct 26, 2020 at 6:01 PM Mark Rutland <mark.rutland@....com> wrote:
> On Mon, Oct 26, 2020 at 05:03:30PM +0100, Arnd Bergmann wrote:
> > @@ -335,6 +335,7 @@ static void cpuinfo_detect_icache_policy(struct cpuinfo_arm64 *info)
> > set_bit(ICACHEF_VPIPT, &__icache_flags);
> > break;
> > default:
> > + case ICACHE_POLICY_RESERVED:
> > case ICACHE_POLICY_VIPT:
> > /* Assume aliasing */
> > set_bit(ICACHEF_ALIASING, &__icache_flags);
> >
> ... but it's a bit weird to have both the default and
> ICACHE_POLICY_RESERVED cases. If we get rid of the default case, does
> any compiler warn? I suspect the masking in CTR_L1IP() might be
> sufficient to let the compiler see we've handled all cases.
It's not an enum, so the compiler doesn't actually know what the
complete set is and doesn't warn without the default. I'll send a v2.
Arnd
Powered by blists - more mailing lists