[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4bhowo76xl3ktpjwpclbvruv2bsbfrs643kdjn6sfivxt2dgx2@yqyojdlk3egu>
Date: Fri, 19 Jul 2024 14:29:25 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>, Chris Lew <quic_clew@...cinc.com>, Arnd Bergmann <arnd@...db.de>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] soc: qcom: pd-mapper: mark qcom_pdm_domains as
__maybe_unused
On Fri, Jul 19, 2024 at 12:12:31PM GMT, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> 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: 1ebcde047c54 ("soc: qcom: add pd-mapper implementation")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> drivers/soc/qcom/qcom_pd_mapper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
--
With best wishes
Dmitry
Powered by blists - more mailing lists