• Borislav Petkov's avatar
    cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning · 64df1fdf
    Borislav Petkov authored
    I keep seeing
    
      drivers/cpufreq/intel_pstate.c: In function ‘intel_pstate_init’:
      drivers/cpufreq/intel_pstate.c:1187:26: warning: initialization from incompatible pointer type
        struct cpuinfo_x86 *c = &boot_cpu_data;
    
    when doing randconfig builds.
    
    This is caused by the fact that when !CONFIG_SMP, asm/processor.h
    defines cpu_info to boot_cpu_data and the local variable
    
      struct cpu_defaults *cpu_info
    
    overshadows it leading to this unfortunate assignment in the
    preprocessed source:
    
     struct cpu_defaults *boot_cpu_data;
     struct cpuinfo_x86 *c = &boot_cpu_data;
    
    Rename the local variable and use static_cpu_has_safe() which alleviates
    the need for defining a local cpuinfo_x86 pointer.
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Acked-by: default avatarKristen Carlson Accardi <kristen@linux.intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    64df1fdf
Name
Last commit
Last update
..
Kconfig Loading commit data...
Kconfig.arm Loading commit data...
Kconfig.powerpc Loading commit data...
Kconfig.x86 Loading commit data...
Makefile Loading commit data...
acpi-cpufreq.c Loading commit data...
amd_freq_sensitivity.c Loading commit data...
arm_big_little.c Loading commit data...
arm_big_little.h Loading commit data...
arm_big_little_dt.c Loading commit data...
at32ap-cpufreq.c Loading commit data...
blackfin-cpufreq.c Loading commit data...
cpufreq-dt.c Loading commit data...
cpufreq-nforce2.c Loading commit data...
cpufreq.c Loading commit data...
cpufreq_conservative.c Loading commit data...
cpufreq_governor.c Loading commit data...
cpufreq_governor.h Loading commit data...
cpufreq_ondemand.c Loading commit data...
cpufreq_opp.c Loading commit data...
cpufreq_performance.c Loading commit data...
cpufreq_powersave.c Loading commit data...
cpufreq_stats.c Loading commit data...
cpufreq_userspace.c Loading commit data...
cris-artpec3-cpufreq.c Loading commit data...
cris-etraxfs-cpufreq.c Loading commit data...
davinci-cpufreq.c Loading commit data...
dbx500-cpufreq.c Loading commit data...
e_powersaver.c Loading commit data...
elanfreq.c Loading commit data...
exynos-cpufreq.c Loading commit data...
exynos-cpufreq.h Loading commit data...
exynos4210-cpufreq.c Loading commit data...
exynos4x12-cpufreq.c Loading commit data...
exynos5250-cpufreq.c Loading commit data...
exynos5440-cpufreq.c Loading commit data...
freq_table.c Loading commit data...
gx-suspmod.c Loading commit data...
highbank-cpufreq.c Loading commit data...
hisi-acpu-cpufreq.c Loading commit data...
ia64-acpi-cpufreq.c Loading commit data...
imx6q-cpufreq.c Loading commit data...
integrator-cpufreq.c Loading commit data...
intel_pstate.c Loading commit data...
kirkwood-cpufreq.c Loading commit data...
longhaul.c Loading commit data...
longhaul.h Loading commit data...
longrun.c Loading commit data...
loongson2_cpufreq.c Loading commit data...
ls1x-cpufreq.c Loading commit data...
maple-cpufreq.c Loading commit data...
omap-cpufreq.c Loading commit data...
p4-clockmod.c Loading commit data...
pasemi-cpufreq.c Loading commit data...
pcc-cpufreq.c Loading commit data...
pmac32-cpufreq.c Loading commit data...
pmac64-cpufreq.c Loading commit data...
powernow-k6.c Loading commit data...
powernow-k7.c Loading commit data...
powernow-k7.h Loading commit data...
powernow-k8.c Loading commit data...
powernow-k8.h Loading commit data...
powernv-cpufreq.c Loading commit data...
ppc_cbe_cpufreq.c Loading commit data...
ppc_cbe_cpufreq.h Loading commit data...
ppc_cbe_cpufreq_pervasive.c Loading commit data...
ppc_cbe_cpufreq_pmi.c Loading commit data...
pxa2xx-cpufreq.c Loading commit data...
pxa3xx-cpufreq.c Loading commit data...
qoriq-cpufreq.c Loading commit data...
s3c2410-cpufreq.c Loading commit data...
s3c2412-cpufreq.c Loading commit data...
s3c2416-cpufreq.c Loading commit data...
s3c2440-cpufreq.c Loading commit data...
s3c24xx-cpufreq-debugfs.c Loading commit data...
s3c24xx-cpufreq.c Loading commit data...
s3c64xx-cpufreq.c Loading commit data...
s5pv210-cpufreq.c Loading commit data...
sa1100-cpufreq.c Loading commit data...
sa1110-cpufreq.c Loading commit data...
sc520_freq.c Loading commit data...
sfi-cpufreq.c Loading commit data...
sh-cpufreq.c Loading commit data...
sparc-us2e-cpufreq.c Loading commit data...
sparc-us3-cpufreq.c Loading commit data...
spear-cpufreq.c Loading commit data...
speedstep-centrino.c Loading commit data...
speedstep-ich.c Loading commit data...
speedstep-lib.c Loading commit data...
speedstep-lib.h Loading commit data...
speedstep-smi.c Loading commit data...
tegra-cpufreq.c Loading commit data...
unicore2-cpufreq.c Loading commit data...
vexpress-spc-cpufreq.c Loading commit data...