arm,arm64,drivers: reduce scope of cap_parsing_failed
authorJuri Lelli <juri.lelli@arm.com>
Wed, 31 May 2017 16:59:29 +0000 (17:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 10:10:09 +0000 (19:10 +0900)
commitc105aa31183a6ebec395681b6df47c8b65259322
tree51c01fc11803e358921e77e1f8e1214a8130142d
parent2ef7a2953c81ee6b341e3ffb33570adc894cf4a5
arm,arm64,drivers: reduce scope of cap_parsing_failed

Reduce the scope of cap_parsing_failed (making it static in
drivers/base/arch_topology.c) by slightly changing {arm,arm64} DT
parsing code.

For arm checking for !cap_parsing_failed before calling normalize_
cpu_capacity() is superfluous, as returning an error from parse_
cpu_capacity() (above) means cap_from _dt is set to false.

For arm64 we can simply check if raw_capacity points to something,
which is not if capacity parsing has failed.

Suggested-by: Morten Rasmussen <morten.rasmussen@arm.com>
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/topology.c
arch/arm64/kernel/topology.c
drivers/base/arch_topology.c