mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-31 14:53:07 +01:00
In krait_cpufreq_probe, both freq and max_cpu_freq are never
initialized, so the max_cpu_freq will have a random value at the end.
Fix this by properly initializing max_cpu_freq to 0 and storing the clk
frequency in freq as well, to make it similar to how it's calculated in
krait_set_target.
Fixes the following warnings:
In file included from include/linux/clk.h:16:0,
from drivers/cpufreq/cpufreq-krait.c:13:
drivers/cpufreq/cpufreq-krait.c: In function 'krait_cpufreq_probe':
include/linux/kernel.h:714:24: warning: 'freq' may be used uninitialized in this function [-Wmaybe-uninitialized]
_max1 > _max2 ? _max1 : _max2; })
^
drivers/cpufreq/cpufreq-krait.c:217:25: note: 'freq' was declared here
unsigned long freq_Hz, freq, max_cpu_freq;
^
In file included from include/linux/clk.h:16:0,
from drivers/cpufreq/cpufreq-krait.c:13:
include/linux/kernel.h:714:24: warning: 'max_cpu_freq' may be used uninitialized in this function [-Wmaybe-uninitialized]
_max1 > _max2 ? _max1 : _max2; })
^
drivers/cpufreq/cpufreq-krait.c:217:31: note: 'max_cpu_freq' was declared here
unsigned long freq_Hz, freq, max_cpu_freq;
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 46839
|
||
|---|---|---|
| .. | ||
| adm5120 | ||
| adm8668 | ||
| ar7 | ||
| ar71xx | ||
| arm64 | ||
| at91 | ||
| ath25 | ||
| au1000 | ||
| bcm53xx | ||
| brcm47xx | ||
| brcm63xx | ||
| brcm2708 | ||
| cns3xxx | ||
| gemini | ||
| generic | ||
| imx6 | ||
| ipq806x | ||
| ixp4xx | ||
| kirkwood | ||
| lantiq | ||
| malta | ||
| mcs814x | ||
| mpc85xx | ||
| mvebu | ||
| mxs | ||
| netlogic | ||
| octeon | ||
| omap | ||
| omap24xx | ||
| orion | ||
| oxnas | ||
| ppc40x | ||
| ppc44x | ||
| pxa | ||
| ramips | ||
| rb532 | ||
| realview | ||
| sunxi | ||
| uml | ||
| x86 | ||
| xburst | ||
| Makefile | ||