mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
| Filename | Latest commit message | Latest commit date |
|---|---|---|
commit e520d0b6be950ce3738cf4b9bd3b392be818f1dc upstream.
Allocate extra space for terminating element at:
drivers/cpufreq/brcmstb-avs-cpufreq.c:
449 table[i].frequency = CPUFREQ_TABLE_END;
and add code comment to make this clear.
This fixes the following -Warray-bounds warning seen after building
ARM with multi_v7_defconfig (GCC 13):
In function 'brcm_avs_get_freq_table',
inlined from 'brcm_avs_cpufreq_init' at drivers/cpufreq/brcmstb-avs-cpufreq.c:623:15:
drivers/cpufreq/brcmstb-avs-cpufreq.c:449:28: warning: array subscript 5 is outside array bounds of 'void[60]' [-Warray-bounds=]
449 | table[i].frequency = CPUFREQ_TABLE_END;
In file included from include/linux/node.h:18,
from include/linux/cpu.h:17,
from include/linux/cpufreq.h:12,
from drivers/cpufreq/brcmstb-avs-cpufreq.c:44:
In function 'devm_kmalloc_array',
inlined from 'devm_kcalloc' at include/linux/device.h:328:9,
inlined from 'brcm_avs_get_freq_table' at drivers/cpufreq/brcmstb-avs-cpufreq.c:437:10,
inlined from 'brcm_avs_cpufreq_init' at drivers/cpufreq/brcmstb-avs-cpufreq.c:623:15:
include/linux/device.h:323:16: note: at offset 60 into object of size 60 allocated by 'devm_kmalloc'
323 | return devm_kmalloc(dev, bytes, flags);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This helps with the ongoing efforts to tighten the FORTIFY_SOURCE
routines on memcpy() and help us make progress towards globally
enabling -Warray-bounds.
Link: https://github.com/KSPP/linux/issues/324
Fixes:
|
||
| .. | ||
| acpi-cpufreq.c | ||
| amd_freq_sensitivity.c | ||
| arm_big_little.c | ||
| arm_big_little.h | ||
| armada-8k-cpufreq.c | ||
| armada-37xx-cpufreq.c | ||
| bmips-cpufreq.c | ||
| brcmstb-avs-cpufreq.c | ||
| cppc_cpufreq.c | ||
| cpufreq-dt-platdev.c | ||
| cpufreq-dt.c | ||
| cpufreq-dt.h | ||
| cpufreq-nforce2.c | ||
| cpufreq.c | ||
| cpufreq_conservative.c | ||
| cpufreq_governor.c | ||
| cpufreq_governor.h | ||
| cpufreq_governor_attr_set.c | ||
| cpufreq_ondemand.c | ||
| cpufreq_ondemand.h | ||
| cpufreq_performance.c | ||
| cpufreq_powersave.c | ||
| cpufreq_stats.c | ||
| cpufreq_userspace.c | ||
| davinci-cpufreq.c | ||
| e_powersaver.c | ||
| elanfreq.c | ||
| freq_table.c | ||
| gx-suspmod.c | ||
| highbank-cpufreq.c | ||
| ia64-acpi-cpufreq.c | ||
| imx-cpufreq-dt.c | ||
| imx6q-cpufreq.c | ||
| intel_pstate.c | ||
| Kconfig | ||
| Kconfig.arm | ||
| Kconfig.powerpc | ||
| Kconfig.x86 | ||
| kirkwood-cpufreq.c | ||
| longhaul.c | ||
| longhaul.h | ||
| longrun.c | ||
| loongson1-cpufreq.c | ||
| loongson2_cpufreq.c | ||
| Makefile | ||
| maple-cpufreq.c | ||
| mediatek-cpufreq.c | ||
| mvebu-cpufreq.c | ||
| omap-cpufreq.c | ||
| p4-clockmod.c | ||
| pasemi-cpufreq.c | ||
| pcc-cpufreq.c | ||
| pmac32-cpufreq.c | ||
| pmac64-cpufreq.c | ||
| powernow-k6.c | ||
| powernow-k7.c | ||
| powernow-k7.h | ||
| powernow-k8.c | ||
| powernow-k8.h | ||
| powernv-cpufreq.c | ||
| ppc_cbe_cpufreq.c | ||
| ppc_cbe_cpufreq.h | ||
| ppc_cbe_cpufreq_pervasive.c | ||
| ppc_cbe_cpufreq_pmi.c | ||
| pxa2xx-cpufreq.c | ||
| pxa3xx-cpufreq.c | ||
| qcom-cpufreq-hw.c | ||
| qcom-cpufreq-nvmem.c | ||
| qoriq-cpufreq.c | ||
| raspberrypi-cpufreq.c | ||
| s3c24xx-cpufreq-debugfs.c | ||
| s3c24xx-cpufreq.c | ||
| s3c64xx-cpufreq.c | ||
| s3c2410-cpufreq.c | ||
| s3c2412-cpufreq.c | ||
| s3c2416-cpufreq.c | ||
| s3c2440-cpufreq.c | ||
| s5pv210-cpufreq.c | ||
| sa1100-cpufreq.c | ||
| sa1110-cpufreq.c | ||
| sc520_freq.c | ||
| scmi-cpufreq.c | ||
| scpi-cpufreq.c | ||
| sfi-cpufreq.c | ||
| sh-cpufreq.c | ||
| sparc-us2e-cpufreq.c | ||
| sparc-us3-cpufreq.c | ||
| spear-cpufreq.c | ||
| speedstep-centrino.c | ||
| speedstep-ich.c | ||
| speedstep-lib.c | ||
| speedstep-lib.h | ||
| speedstep-smi.c | ||
| sti-cpufreq.c | ||
| sun50i-cpufreq-nvmem.c | ||
| tango-cpufreq.c | ||
| tegra20-cpufreq.c | ||
| tegra124-cpufreq.c | ||
| tegra186-cpufreq.c | ||
| ti-cpufreq.c | ||
| unicore2-cpufreq.c | ||
| vexpress-spc-cpufreq.c | ||