On Tue, 08 Sep 2026, Mario Limonciello <[email protected]> wrote:
> On 9/8/26 10:45, Jani Nikula wrote:
>> On Mon, 07 Sep 2026, Mario Limonciello <[email protected]> wrote:
>>> +/* Forward declaration for backlight_update_status */
>>> +#if IS_REACHABLE(CONFIG_BACKLIGHT_CLASS_DEVICE)
>> 
>> I think IS_REACHABLE() is almost always a mistake. It's a hack to avoid
>> link errors when something in a module needs something that is
>> built-in. It's a combo that should be handled at Kconfig level, not at
>> build level.
>> 
>> BR,
>> Jani.
>
> That came from this feedback from Thomas Zimmerman (I originally had it 
> as select:
>
> https://lore.kernel.org/dri-devel/[email protected]/
>
> I was trying to use IS_REACHABLE to make it optional, but it sounds like 
> that's not the right direction then?

I agree with Thomas, but he's also not suggesting to use IS_REACHABLE()!

The point is, if you express the dependencies properly with "depends on"
in Kconfig, you won't need IS_REACHABLE(). It's the "select" that can
lead to incorrect configurations, and IS_REACHABLE() is band-aid to work
around this.

BR,
Jani.


-- 
Jani Nikula, Intel

Reply via email to