]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cpufreq: Fix warning on unused of_device_id tables for !CONFIG_OF
authorRob Herring (Arm) <robh@kernel.org>
Fri, 9 Aug 2024 17:24:38 +0000 (11:24 -0600)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 4 Sep 2024 15:13:59 +0000 (20:43 +0530)
!CONFIG_OF builds cause warnings on unused of_device_id tables. This is
due to of_match_node() being a macro rather than static inline function.
Add a __maybe_unused annotation to the of_device_id tables.

Fixes: c7582ec85342 ("cpufreq: Drop CONFIG_ARM and CONFIG_ARM64 dependency on Arm drivers")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202408090714.wcrqU6Pk-lkp@intel.com/
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/apple-soc-cpufreq.c
drivers/cpufreq/mediatek-cpufreq.c
drivers/cpufreq/qcom-cpufreq-nvmem.c
drivers/cpufreq/ti-cpufreq.c

index af34c22fa273dad8fa96f60844c4fac6ea7db5d5..4dcacab9b4bf25c7fb81095619301ee2054af74e 100644 (file)
@@ -85,7 +85,7 @@ static const struct apple_soc_cpufreq_info soc_default_info = {
        .cur_pstate_mask = 0, /* fallback */
 };
 
-static const struct of_device_id apple_soc_cpufreq_of_match[] = {
+static const struct of_device_id apple_soc_cpufreq_of_match[] __maybe_unused = {
        {
                .compatible = "apple,t8103-cluster-cpufreq",
                .data = &soc_t8103_info,
index 3a1aadaa723c4abe5f1fa11ff1f630d472876882..663f61565cf7289fe34d9a735e825206dd13152c 100644 (file)
@@ -738,7 +738,7 @@ static const struct mtk_cpufreq_platform_data mt8516_platform_data = {
 };
 
 /* List of machines supported by this driver */
-static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
+static const struct of_device_id mtk_cpufreq_machines[] __initconst __maybe_unused = {
        { .compatible = "mediatek,mt2701", .data = &mt2701_platform_data },
        { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
        { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
index 939702dfa73f759a416325a60f362bbe0654da6e..703308fb891a331362cda1cdb9a79a16fe152638 100644 (file)
@@ -611,7 +611,7 @@ static struct platform_driver qcom_cpufreq_driver = {
        },
 };
 
-static const struct of_device_id qcom_cpufreq_match_list[] __initconst = {
+static const struct of_device_id qcom_cpufreq_match_list[] __initconst __maybe_unused = {
        { .compatible = "qcom,apq8096", .data = &match_data_kryo },
        { .compatible = "qcom,msm8909", .data = &match_data_msm8909 },
        { .compatible = "qcom,msm8996", .data = &match_data_kryo },
index 4d3f27958fbde9f7957bdbee1c6b110025c272b0..220fff7a302ef51f7e7c894914a203a48cdf6ba5 100644 (file)
@@ -419,7 +419,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
        return 0;
 }
 
-static const struct of_device_id ti_cpufreq_of_match[] = {
+static const struct of_device_id ti_cpufreq_of_match[]  __maybe_unused = {
        { .compatible = "ti,am33xx", .data = &am3x_soc_data, },
        { .compatible = "ti,am3517", .data = &am3517_soc_data, },
        { .compatible = "ti,am43", .data = &am4x_soc_data, },