lkml.org 
[lkml]   [2021]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency
On Mon, Jan 4, 2021 at 4:00 PM Jaroslav Kysela <perex@perex.cz> wrote:
> Dne 03. 01. 21 v 14:52 Arnd Bergmann napsal(a):

> > diff --git a/include/sound/intel-dsp-config.h b/include/sound/intel-dsp-config.h
> > index d4609077c258..94667e870029 100644
> > --- a/include/sound/intel-dsp-config.h
> > +++ b/include/sound/intel-dsp-config.h
> > @@ -18,24 +18,7 @@ enum {
> > SND_INTEL_DSP_DRIVER_LAST = SND_INTEL_DSP_DRIVER_SOF
> > };
> >
> > -#if IS_ENABLED(CONFIG_SND_INTEL_DSP_CONFIG)
>
> The SOF drivers selects the DSP config code only when required (for specific
> platforms - see sound/soc/sof/intel/Kconfig).
>
> It seems that the above if should be modified as:
>
> #if IS_BUILDIN(CONFIG_SND_INTEL_DSP_CONFIG) || (defined(MODULE) &&
> IS_MODULE(CONFIG_SND_INTEL_DSP_CONFIG))
>
> So the buildin drivers which do not require the DSP config probe can be
> compiled without this dependency.

This would be the same as

#if IS_REACHABLE(CONFIG_SND_INTEL_DSP_CONFIG)

but using that macro is almost always a bad idea, as it tends to hide
dependency problems and causes things to silently not work right
when the Kconfig rules are incorrect.

Arnd

\
 
 \ /
  Last update: 2021-01-05 14:32    [W:0.120 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site