[lkml]   [2022]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH -next] misc: rtsx: fix build for CONFIG_PM not set

Le dim., févr. 27 2022 at 18:51:38 +0100, Arnd Bergmann
<> a écrit :
> On Sun, Feb 27, 2022 at 6:46 PM Paul Cercueil <>
> wrote:
>> Le dim., févr. 27 2022 at 18:30:16 +0100, Arnd Bergmann
>> There could be a DEFINE_DEV_PM_OPS(), but I don't think that's
>> really
>> needed - you can very well declare your struct dev_pm_ops without
>> using
>> one of these macros. Just make sure to use the SYSTEM_SLEEP_PM_OPS /
>> RUNTIME_PM_OPS macros for the callbacks and pm_ptr() for the
>> pointer.
> Ah, of course, so it comes down to
> removing all the #ifdef an __maybe_unused annotations. The pm_ptr()
> in makes this slightly more optimized AFAICT, but has no
> effect on behavior, right?

The use of SYSTEM_SLEEP_PM_OPS makes sure that the callbacks are
dropped if the dev_pm_ops is dead code, and the pm_ptr() must be used
for the compiler to know that the dev_pm_ops is dead code.


 \ /
  Last update: 2022-02-27 18:57    [W:0.081 / U:0.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site