Commit dbd6bd12 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Bjorn Andersson
Browse files

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: 1ebcde04 ("soc: qcom: add pd-mapper implementation")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240719101238.199850-1-arnd@kernel.org


Signed-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent f9bb896e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment