Re: [PATCH v3 1/3] fbdev: Fix recursive dependencies wrt BACKLIGHT_CLASS_DEVICE
From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2024-12-22 20:50:40
Also in:
dri-devel, linux-fbdev, linux-staging
From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2024-12-22 20:50:40
Also in:
dri-devel, linux-fbdev, linux-staging
On Sun, Dec 22, 2024, at 21:15, Helge Deller wrote:
On 12/22/24 17:09, Thomas Zimmermann wrote:
quoted
quoted
quoted
+ depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIASeems wrong. BACKLIGHT_CLASS_DEVICE is of type tristate. There are more of those, please check.It's exactly correct. Linking would fail with FB_NVIDIA=y and BACKLIGHT=m. The above construct avoids this case. Please see Arnd's review comment at [1].I'm not arguing against "depends on BACKLIGHT_CLASS_DEVICE=y". It's the "BACKLIGHT_CLASS_DEVICE=FB_NVIDIA" which is wrong. BACKLIGHT_CLASS_DEVICE is tristate, so either "y", "n" or "m", but never "FB_NVIDIA".
There are multiple ways to express this, but that line is a correct
way to allow all of
BACKLIGHT_CLASS_DEVICE=y, FB_NVIDIA=m, FB_NVIDIA_BACKLIGHT=y
BACKLIGHT_CLASS_DEVICE=y, FB_NVIDIA=y, FB_NVIDIA_BACKLIGHT=y
BACKLIGHT_CLASS_DEVICE=m, FB_NVIDIA=m, FB_NVIDIA_BACKLIGHT=y
but disallow the broken
BACKLIGHT_CLASS_DEVICE=m, FB_NVIDIA=y, FB_NVIDIA_BACKLIGHT=y
If you find this line too confusing, can you suggest a different
expression that has the same behavior?
Arnd