Re: [PATCH] media: nxp: ignore unused suspend operations

From: Arnd Bergmann
Date: Tue Apr 18 2023 - 05:21:30 EST


On Tue, Apr 18, 2023, at 10:19, Laurent Pinchart wrote:
> On Tue, Apr 18, 2023 at 10:04:13AM +0200, Hans Verkuil wrote:
>> Hi Arnd,
>>
>> On 18/04/2023 09:15, Arnd Bergmann wrote:
>> > From: Arnd Bergmann <arnd@xxxxxxxx>
>> >
>> > gcc warns about some functions being unused when CONFIG_PM is
>> > disabled:
>>
>> ???
>>
>> The Kconfig has a:
>>
>> depends on HAS_DMA && PM
>>
>> So how can this be compiled with CONFIG_PM not set?
>>
>> Am I missing something?
>
> The warning appears when CONFIG_PM_SLEEP is disabled. The pm_ptr()
> change is thus not useful, but the switch to SYSTEM_SLEEP_PM_OPS() and
> RUNTIME_PM_OPS() make a difference.

I sent a v3 now. I ended up leaving the pm_ptr() in here, based on
the recommended usage of the new macros.

Arnd