[PATCH] fbdev: replace dead select with dependency

Julian Braha posted 1 patch 1 day, 23 hours ago
There is a newer version of this series
drivers/video/fbdev/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] fbdev: replace dead select with dependency
Posted by Julian Braha 1 day, 23 hours ago
'select' does not work on config options in a 'choice', so currently it is
possible to enable FB_MB862XX_LIME without FB_LITTLE_ENDIAN.

We cannot replace the 'select FB_LITTLE_ENDIAN' without also changing
FB_FOREIGN_ENDIAN from 'select' to 'depends on', otherwise we will get
a recursive dependency.

Note that, if we remove the select / dependency, the kernel will compile
with FB_MB862XX_LIME=y and FB_LITTLE_ENDIAN=n so if it would be
better to remove the select, please advise as I do not have the hardware
to runtime test this.

This dead select was found by kconfirm, a static analysis tool for Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 drivers/video/fbdev/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
index 085d3a202148..1ed4506c0cb2 100644
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -1717,8 +1717,8 @@ config FB_MB862XX_PCI_GDC
 config FB_MB862XX_LIME
 	bool "Lime GDC"
 	depends on OF && PPC
-	select FB_FOREIGN_ENDIAN
-	select FB_LITTLE_ENDIAN
+	depends on FB_FOREIGN_ENDIAN
+	depends on FB_LITTLE_ENDIAN
 	help
 	  Framebuffer support for Fujitsu Lime GDC on host CPU bus.
 
-- 
2.54.0
Re: [PATCH] fbdev: replace dead select with dependency
Posted by Arnd Bergmann 1 day, 15 hours ago
On Thu, Jul 23, 2026, at 00:00, Julian Braha wrote:
> diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> index 085d3a202148..1ed4506c0cb2 100644
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -1717,8 +1717,8 @@ config FB_MB862XX_PCI_GDC
>  config FB_MB862XX_LIME
>  	bool "Lime GDC"
>  	depends on OF && PPC
> -	select FB_FOREIGN_ENDIAN
> -	select FB_LITTLE_ENDIAN
> +	depends on FB_FOREIGN_ENDIAN
> +	depends on FB_LITTLE_ENDIAN
>  	help
>  	  Framebuffer support for Fujitsu Lime GDC on host CPU bus.

I would make this one

       select FB_FOREIGN_ENDIAN
       depends on FB_LITTLE_ENDIAN || FB_BOTH_ENDIAN

to avoid breanking defconfig files. The default choice is
FB_BOTH_ENDIAN, and that should work fine here.

     Arnd