Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: highbank: do not initialize array with a loop

As uninitialized array members will be initialized to zero, we can
avoid using a for loop by setting a value to it.

Signed-off-by: Emilio López <emilio@elopez.com.ar>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-By: Mark Langsdorf <mark.langsdorf@calxeda.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Emilio López and committed by
Rafael J. Wysocki
f5f43dcf 4b875810

+1 -7
+1 -7
drivers/cpufreq/highbank-cpufreq.c
··· 28 28 29 29 static int hb_voltage_change(unsigned int freq) 30 30 { 31 - int i; 32 - u32 msg[HB_CPUFREQ_IPC_LEN]; 33 - 34 - msg[0] = HB_CPUFREQ_CHANGE_NOTE; 35 - msg[1] = freq / 1000000; 36 - for (i = 2; i < HB_CPUFREQ_IPC_LEN; i++) 37 - msg[i] = 0; 31 + u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 1000000}; 38 32 39 33 return pl320_ipc_transmit(msg); 40 34 }