Re: [PATCH] leds: rgb: Drop obsolete dependency on COMPILE_TEST
From: Jean Delvare
Date: Wed Dec 13 2023 - 14:56:37 EST
Hi Lee,
On Wed, 13 Dec 2023 15:38:38 +0000, Lee Jones wrote:
> On Sat, 02 Dec 2023, Jean Delvare wrote:
>
> > Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it
> > is possible to test-build any driver which depends on OF on any
> > architecture by explicitly selecting OF. Therefore depending on
> > COMPILE_TEST as an alternative is no longer needed.
> >
> > Signed-off-by: Jean Delvare <jdelvare@xxxxxxx>
> > Cc: Pavel Machek <pavel@xxxxxx>
> > Cc: Lee Jones <lee@xxxxxxxxxx>
> > ---
> > drivers/leds/rgb/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> It's not clear to me what this patch improves.
The patch description supposedly explains that, I'm not sure how to
word it better, especially considering that 24 similar patches have
already been accepted by various subsystem maintainers over the past 18
months with the same explanation.
The purpose of COMPILE_TEST is to increase the build test coverage by
letting developers enable drivers which would otherwise not be available
on their architecture or platform. Given that OF can now be enabled on
all architectures and platforms, using COMPILE_TEST as an alternative
is simply no longer needed, and there is no reason to keep dead code.
Cleaning this up has many benefits:
* Makes Kconfig easier to read.
* Makes it clear to the reader that OF is no longer architecture or
platform dependent.
* Less work for the dependency solver, so faster make *config.
* Avoids copy-and-paste of an obsolete construct to new Kconfig entries.
Lastly, I can quote an explanation which was part of my earlier
submissions but was dropped after someone suggested that it was too
verbose for such a simple clean up. Maybe you will find it meaningful:
It is actually better to always build such drivers with OF enabled,
so that the test builds are closer to how each driver will actually be
built on its intended target. Building them without OF may not test
much as the compiler will optimize out potentially large parts of the
code. In the worst case, this could even pop false positive warnings.
Dropping COMPILE_TEST here improves the quality of our testing and
avoids wasting time on non-existent issues.
Hope that helps,
--
Jean Delvare
SUSE L3 Support