]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/64: Used named initialisers for ibm_pa_features
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 28 Oct 2016 06:39:53 +0000 (17:39 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 Nov 2016 12:02:19 +0000 (23:02 +1100)
commite9eb0278dad9c7a2631d5432180a130710110c09
tree837a2226a78607735c11eb06b3ee030709fe3385
parent3baad97067ba20653c0c31eb307c5c7d9480fcb0
powerpc/64: Used named initialisers for ibm_pa_features

The ibm_pa_features array consists of structures that describe which bit
and byte in the ibm,pa-features property toggles one or more flags in
either the CPU, MMU, or user visible feature flags.

Each one consists of 7 values, which are all unsigned long, int or char,
meaning the compiler gives us no warning if we assign the wrong values
to the wrong elements. In fact we have had a bug here in the past, where
we were setting incorrect bits, see commit 6997e57d693b ("powerpc:
scan_features() updates incorrect bits for REAL_LE").

So switch to using named initialisers for the structure elements, to
reduce the likelihood of future bugs, and hopefully improve readability
also.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Balbir Singh <bsingharora@gmail.com>
arch/powerpc/kernel/prom.c