* [PATCH] soundwire: qcom: fix build failures if CONFIG_PM=n
@ 2022-03-03 11:03 Srinivas Kandagatla
2022-03-03 15:55 ` Vinod Koul
0 siblings, 1 reply; 3+ messages in thread
From: Srinivas Kandagatla @ 2022-03-03 11:03 UTC (permalink / raw)
To: vkoul, yung-chuan.liao
Cc: pierre-louis.bossart, devicetree, linux-kernel, alsa-devel,
quic_srivasam, Srinivas Kandagatla, Geert Uytterhoeven,
Stephen Rothwell
Fix below build failure
drivers/soundwire/qcom.c:1460:12: error: 'swrm_runtime_resume' defined
but not used [-Werror=unused-function]
by marking the resume swrm_runtime_resume() with __maybe_unused attribute.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/soundwire/qcom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index e893aee1b057..6575695cd400 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1459,7 +1459,7 @@ static bool swrm_wait_for_frame_gen_enabled(struct qcom_swrm_ctrl *swrm)
return false;
}
-static int swrm_runtime_resume(struct device *dev)
+static int __maybe_unused swrm_runtime_resume(struct device *dev)
{
struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dev);
int ret;
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] soundwire: qcom: fix build failures if CONFIG_PM=n
2022-03-03 11:03 [PATCH] soundwire: qcom: fix build failures if CONFIG_PM=n Srinivas Kandagatla
@ 2022-03-03 15:55 ` Vinod Koul
2022-03-03 16:28 ` Srinivas Kandagatla
0 siblings, 1 reply; 3+ messages in thread
From: Vinod Koul @ 2022-03-03 15:55 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: yung-chuan.liao, pierre-louis.bossart, devicetree, linux-kernel,
alsa-devel, quic_srivasam, Geert Uytterhoeven, Stephen Rothwell
On 03-03-22, 11:03, Srinivas Kandagatla wrote:
> Fix below build failure
> drivers/soundwire/qcom.c:1460:12: error: 'swrm_runtime_resume' defined
> but not used [-Werror=unused-function]
> by marking the resume swrm_runtime_resume() with __maybe_unused attribute.
A patch title should reflect the change and not the cause. So i have
taken liberty to fix it as:
soundwire: qcom: use __maybe_unused for swrm_runtime_resume()
swrm_runtime_resume() would not be defined when CONFIG_PM=n
This causes below build failure
drivers/soundwire/qcom.c:1460:12: error: 'swrm_runtime_resume' defined
but not used [-Werror=unused-function]
Mark the resume swrm_runtime_resume() with __maybe_unused attribute.
With this i have applied
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] soundwire: qcom: fix build failures if CONFIG_PM=n
2022-03-03 15:55 ` Vinod Koul
@ 2022-03-03 16:28 ` Srinivas Kandagatla
0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2022-03-03 16:28 UTC (permalink / raw)
To: Vinod Koul
Cc: yung-chuan.liao, pierre-louis.bossart, devicetree, linux-kernel,
alsa-devel, quic_srivasam, Geert Uytterhoeven, Stephen Rothwell
On 03/03/2022 15:55, Vinod Koul wrote:
> On 03-03-22, 11:03, Srinivas Kandagatla wrote:
>> Fix below build failure
>> drivers/soundwire/qcom.c:1460:12: error: 'swrm_runtime_resume' defined
>> but not used [-Werror=unused-function]
>> by marking the resume swrm_runtime_resume() with __maybe_unused attribute.
>
> A patch title should reflect the change and not the cause. So i have
> taken liberty to fix it as:
>
> soundwire: qcom: use __maybe_unused for swrm_runtime_resume()
>
> swrm_runtime_resume() would not be defined when CONFIG_PM=n
>
> This causes below build failure
> drivers/soundwire/qcom.c:1460:12: error: 'swrm_runtime_resume' defined
> but not used [-Werror=unused-function]
>
> Mark the resume swrm_runtime_resume() with __maybe_unused attribute.
>
> With this i have applied
Thanks Vinod,
--srini
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-03 16:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 11:03 [PATCH] soundwire: qcom: fix build failures if CONFIG_PM=n Srinivas Kandagatla
2022-03-03 15:55 ` Vinod Koul
2022-03-03 16:28 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).