Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44ae903b authored by Mark Brown's avatar Mark Brown Committed by Russell King
Browse files

ARM: 8008/1: topology: Coding style fixes



Use kcalloc() and ULONG_MAX rather than open coding them.

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent c9eaa447
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -91,13 +91,13 @@ static void __init parse_dt_topology(void)
{
{
	const struct cpu_efficiency *cpu_eff;
	const struct cpu_efficiency *cpu_eff;
	struct device_node *cn = NULL;
	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 max_capacity = 0;
	unsigned long capacity = 0;
	unsigned long capacity = 0;
	int alloc_size, cpu = 0;
	int cpu = 0;


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


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