On Tue, Sep 7, 2021 at 9:02 AM Geert Uytterhoeven [off-list ref] wrote:
On Mon, Sep 6, 2021 at 9:58 PM Palmer Dabbelt [off-list ref] wrote:
quoted
From: Palmer Dabbelt <redacted>
quoted
+#ifdef CONFIG_PM_SLEEP
static int cdn_dp_resume(struct device *dev)
An alternative solution would be to tag the function with
__maybe_unused.
Right. In this case, both are correct, but generally speaking I tend to use the
__maybe_unused variant because it's more reliable at fixing the warning for
good when there are additional functions called by the suspend/resume
helpers that now become unused in some configurations, or when you pick
the wrong set of #ifdefs.
Having fewer #ifdef checks also helps with build coverage testing when there
is a warning inside of an #ifdef.
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel