Re: [PATCH 01/12] ALSA: hda: intel: Reduce CONFIG_PM dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 08 May 2024 19:45:42 +0200,
Andy Shevchenko wrote:
> 
> On Mon, May 06, 2024 at 06:13:44PM +0200, Takashi Iwai wrote:
> > snd-hda-intel contains lots of CONFIG_PM dependent code although
> > CONFIG_PM is almost mandatory nowadays, and it makes the code
> > unnecessarily complex.
> > 
> > Let's reduce the dependencies of CONFIG_PM in snd-hda-intel driver
> > code.  I left a few module options to be dependent on CONFIG_PM (which
> > are visible to users), but other places are either enabled or
> > optimized by compiler automatically.
> 
> ...
> 
> > +static int __maybe_unused azx_resume(struct device *dev)
> 
> __maybe)unused is discouraged nowadays.
> We have new PM macros (w/o SET_ prefix) along with pm_ptr() / pm_sleep_ptr()
> macros. They are preferred. In complicated cases the PTR_IF() can be used
> directly.

Yeah, it was a dilemma there.  There seems no standard macro to use
pm_ptr() for runtime_suspend (there is only RUNTIME_PM_OPS()), so for
avoiding __maybe_unused, I'd have to expand them manually instead.


Takashi




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux