Skip to content

Commit 24f9bfb

Browse files
robherringvireshk
authored andcommitted
cpufreq: Fix warning on unused of_device_id tables for !CONFIG_OF
!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: c7582ec ("cpufreq: Drop CONFIG_ARM and CONFIG_ARM64 dependency on Arm drivers") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 49243ad commit 24f9bfb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/cpufreq/apple-soc-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static const struct apple_soc_cpufreq_info soc_default_info = {
8585
.cur_pstate_mask = 0, /* fallback */
8686
};
8787

88-
static const struct of_device_id apple_soc_cpufreq_of_match[] = {
88+
static const struct of_device_id apple_soc_cpufreq_of_match[] __maybe_unused = {
8989
{
9090
.compatible = "apple,t8103-cluster-cpufreq",
9191
.data = &soc_t8103_info,

drivers/cpufreq/mediatek-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ static const struct mtk_cpufreq_platform_data mt8516_platform_data = {
738738
};
739739

740740
/* List of machines supported by this driver */
741-
static const struct of_device_id mtk_cpufreq_machines[] __initconst = {
741+
static const struct of_device_id mtk_cpufreq_machines[] __initconst __maybe_unused = {
742742
{ .compatible = "mediatek,mt2701", .data = &mt2701_platform_data },
743743
{ .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
744744
{ .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },

drivers/cpufreq/qcom-cpufreq-nvmem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ static struct platform_driver qcom_cpufreq_driver = {
611611
},
612612
};
613613

614-
static const struct of_device_id qcom_cpufreq_match_list[] __initconst = {
614+
static const struct of_device_id qcom_cpufreq_match_list[] __initconst __maybe_unused = {
615615
{ .compatible = "qcom,apq8096", .data = &match_data_kryo },
616616
{ .compatible = "qcom,msm8909", .data = &match_data_msm8909 },
617617
{ .compatible = "qcom,msm8996", .data = &match_data_kryo },

drivers/cpufreq/ti-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static int ti_cpufreq_setup_syscon_register(struct ti_cpufreq_data *opp_data)
419419
return 0;
420420
}
421421

422-
static const struct of_device_id ti_cpufreq_of_match[] = {
422+
static const struct of_device_id ti_cpufreq_of_match[] __maybe_unused = {
423423
{ .compatible = "ti,am33xx", .data = &am3x_soc_data, },
424424
{ .compatible = "ti,am3517", .data = &am3517_soc_data, },
425425
{ .compatible = "ti,am43", .data = &am4x_soc_data, },

0 commit comments

Comments
 (0)