Skip to content

Commit c3852d2

Browse files
Ansuelvireshk
authored andcommitted
cpufreq: qcom-nvmem: fix compilation warning for qcom_cpufreq_ipq806x_match_list
If CONFIG_OF is not enabled, of_match_node() is set as NULL and qcom_cpufreq_ipq806x_match_list won't be used causing a compilation warning. Flag qcom_cpufreq_ipq806x_match_list as __maybe_unused to fix the compilation warning. While at it also flag as __initconst as it's used only in probe contest and can be freed after probe. This follows the pattern of the usual of_device_id variables. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202511202119.6zvvFMup-lkp@intel.com/ Fixes: 58f5d39 ("cpufreq: qcom-nvmem: add compatible fallback for ipq806x for no SMEM") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> [ Viresh: Drop __initconst ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent 47c303b commit c3852d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cpufreq/qcom-cpufreq-nvmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static int qcom_cpufreq_krait_name_version(struct device *cpu_dev,
256256
return ret;
257257
}
258258

259-
static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] = {
259+
static const struct of_device_id qcom_cpufreq_ipq806x_match_list[] __maybe_unused = {
260260
{ .compatible = "qcom,ipq8062", .data = (const void *)QCOM_ID_IPQ8062 },
261261
{ .compatible = "qcom,ipq8064", .data = (const void *)QCOM_ID_IPQ8064 },
262262
{ .compatible = "qcom,ipq8065", .data = (const void *)QCOM_ID_IPQ8065 },

0 commit comments

Comments
 (0)