From: Emilio López Date: Mon, 25 Feb 2013 11:07:45 +0000 (+0000) Subject: cpufreq: highbank: do not initialize array with a loop X-Git-Tag: v3.9-rc2~16^2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5f43dcfff3a3c7f7de4a0cfca0106a0ccd58bd7;p=platform%2Fkernel%2Flinux-stable.git 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 Acked-by: Viresh Kumar Acked-By: Mark Langsdorf Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/highbank-cpufreq.c b/drivers/cpufreq/highbank-cpufreq.c index 66e3a71..b61b5a3 100644 --- a/drivers/cpufreq/highbank-cpufreq.c +++ b/drivers/cpufreq/highbank-cpufreq.c @@ -28,13 +28,7 @@ static int hb_voltage_change(unsigned int freq) { - int i; - u32 msg[HB_CPUFREQ_IPC_LEN]; - - msg[0] = HB_CPUFREQ_CHANGE_NOTE; - msg[1] = freq / 1000000; - for (i = 2; i < HB_CPUFREQ_IPC_LEN; i++) - msg[i] = 0; + u32 msg[HB_CPUFREQ_IPC_LEN] = {HB_CPUFREQ_CHANGE_NOTE, freq / 1000000}; return pl320_ipc_transmit(msg); }