diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2017-06-23 12:25:32 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-17 18:32:05 +0300 |
commit | 805df2966f67a6b1a228c8e580e230b6c849b41e (patch) | |
tree | d600706aaa5a28ebba5825362f7640091c8a1c7d /drivers/base | |
parent | 93a57081d20c1f93c209fec0f247f5bed936cc34 (diff) | |
download | linux-805df2966f67a6b1a228c8e580e230b6c849b41e.tar.xz |
arch_topology: Change return type of topology_parse_cpu_capacity() to bool
topology_parse_cpu_capacity() returns 1 on success and 0 on errors. Make
it return bool instead of int as that suits the purpose better.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Juri Lelli <juri.lelli@arm.com>
Tested-by: Juri Lelli <juri.lelli@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/arch_topology.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index a3cd7c869c3e..5728e2fbb765 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -119,13 +119,13 @@ void topology_normalize_cpu_scale(void) mutex_unlock(&cpu_scale_mutex); } -int __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) +bool __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) { - int ret = 1; + int ret; u32 cpu_capacity; if (cap_parsing_failed) - return !ret; + return false; ret = of_property_read_u32(cpu_node, "capacity-dmips-mhz", &cpu_capacity); @@ -137,7 +137,7 @@ int __init topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu) if (!raw_capacity) { pr_err("cpu_capacity: failed to allocate memory for raw capacities\n"); cap_parsing_failed = true; - return 0; + return false; } } capacity_scale = max(cpu_capacity, capacity_scale); |