Skip to content

Commit

Permalink
ARM: 8008/1: topology: Coding style fixes
Browse files Browse the repository at this point in the history
Use kcalloc() and ULONG_MAX rather than open coding them.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Mark Brown authored and Russell King committed Apr 14, 2014
1 parent c9eaa44 commit 44ae903
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions arch/arm/kernel/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ static void __init parse_dt_topology(void)
{
const struct cpu_efficiency *cpu_eff;
struct device_node *cn = NULL;
unsigned long min_capacity = (unsigned long)(-1);
unsigned long min_capacity = ULONG_MAX;
unsigned long max_capacity = 0;
unsigned long capacity = 0;
int alloc_size, cpu = 0;
int cpu = 0;

alloc_size = nr_cpu_ids * sizeof(*__cpu_capacity);
__cpu_capacity = kzalloc(alloc_size, GFP_NOWAIT);
__cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
GFP_NOWAIT);

for_each_possible_cpu(cpu) {
const u32 *rate;
Expand Down

0 comments on commit 44ae903

Please sign in to comment.