You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target
Jonas Gorski 82fb27917b ipq806x: fix uninitialized variable usage in cpufreq-krait
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
9 years ago
..
imagebuilder build: Prevent more gzip timestamps 9 years ago
linux ipq806x: fix uninitialized variable usage in cpufreq-krait 9 years ago
sdk sdk: provide explicit CONFIG_MODULES kconfig symbol 9 years ago
toolchain toolchain: respect CONFIG_VERSION_FILENAMES and add host system suffix 9 years ago
Config.in build: remove obsolete references to cris and avr32 9 years ago
Makefile target: do not make target/*/install depend on target/*/compile - removes one redundant kernel build dir call on target/install 12 years ago