Message ID | 20231202214353.7c02f23c@endymion.delvare |
---|---|
State | New |
Headers | show |
Series | leds: rgb: Drop obsolete dependency on COMPILE_TEST | expand |
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@suse.de> > Cc: Pavel Machek <pavel@ucw.cz> > Cc: Lee Jones <lee@kernel.org> > --- > drivers/leds/rgb/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) It's not clear to me what this patch improves. Going to choose to keep the status quo on this one. > --- linux-6.6.orig/drivers/leds/rgb/Kconfig > +++ linux-6.6/drivers/leds/rgb/Kconfig > @@ -4,7 +4,7 @@ if LEDS_CLASS_MULTICOLOR > > config LEDS_GROUP_MULTICOLOR > tristate "LEDs group multi-color support" > - depends on OF || COMPILE_TEST > + depends on OF > help > This option enables support for monochrome LEDs that are grouped > into multicolor LEDs which is useful in the case where LEDs of > > > -- > Jean Delvare > SUSE L3 Support
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@suse.de> > > Cc: Pavel Machek <pavel@ucw.cz> > > Cc: Lee Jones <lee@kernel.org> > > --- > > 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,
On Sat, 02 Dec 2023 21:43:53 +0100, 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. > > Applied, thanks! [1/1] leds: rgb: Drop obsolete dependency on COMPILE_TEST commit: 5e72f1fe23839bd2093693a357a6fac8e5463483 -- Lee Jones [李琼斯]
--- linux-6.6.orig/drivers/leds/rgb/Kconfig +++ linux-6.6/drivers/leds/rgb/Kconfig @@ -4,7 +4,7 @@ if LEDS_CLASS_MULTICOLOR config LEDS_GROUP_MULTICOLOR tristate "LEDs group multi-color support" - depends on OF || COMPILE_TEST + depends on OF help This option enables support for monochrome LEDs that are grouped into multicolor LEDs which is useful in the case where LEDs of
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@suse.de> Cc: Pavel Machek <pavel@ucw.cz> Cc: Lee Jones <lee@kernel.org> --- drivers/leds/rgb/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)