Skip to content

Commit dbd6bd1

Browse files
arndbandersson
authored andcommitted
soc: qcom: pd-mapper: mark qcom_pdm_domains as __maybe_unused
The qcom_pdm_domains[] array is used only when passing it into of_match_node() but is not also referenced by MODULE_DEVICE_TABLE() or the platform driver as a table. When CONFIG_OF is disabled, this causes a harmless build warning: drivers/soc/qcom/qcom_pd_mapper.c:520:34: error: 'qcom_pdm_domains' defined but not used [-Werror=unused-const-variable=] Avoid this by marking the variable as __maybe_unused. This also makes it clear that anything referenced by it will be dropped by the compiler when it is unused. Fixes: 1ebcde0 ("soc: qcom: add pd-mapper implementation") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent f9bb896 commit dbd6bd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/qcom/qcom_pd_mapper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ static const struct qcom_pdm_domain_data *sm8550_domains[] = {
517517
NULL,
518518
};
519519

520-
static const struct of_device_id qcom_pdm_domains[] = {
520+
static const struct of_device_id qcom_pdm_domains[] __maybe_unused = {
521521
{ .compatible = "qcom,apq8064", .data = NULL, },
522522
{ .compatible = "qcom,apq8074", .data = NULL, },
523523
{ .compatible = "qcom,apq8084", .data = NULL, },

0 commit comments

Comments
 (0)