Skip to contentSkip to conversation

drm/panel: remove unnecessary dependencies

PATCH Superseded Russell King 3 participants 4 messages Jun 12, 2014

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/panel: remove unnecessary dependencies

DRM_PANEL_LD9040 and DRM_PANEL_S6E8AA0 both explicitly depended on DRM_PANEL && DRM. This is nonsense for two reasons:

(a) DRM_PANEL already depends on DRM, so DRM_PANEL can not be enabled without DRM first being enabled. Hence the && DRM is useless.

(b) These two configs are already beneath a menu which depends on DRM_PANEL being enabled; these options will not be visible without DRM_PANEL already being enabled.

Let's just remove this unnecessary verbosity.

---
 drivers/gpu/drm/panel/Kconfig | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/panel/Kconfig +0 -2
index 4ec874da5668..44aea730b3aa 100644
@@ -18,14 +18,12 @@ config DRM_PANEL_SIMPLE
 
 config DRM_PANEL_LD9040
 	tristate "LD9040 RGB/SPI panel"
-	depends on DRM && DRM_PANEL
 	depends on OF
 	select SPI
 	select VIDEOMODE_HELPERS
 
 config DRM_PANEL_S6E8AA0
 	tristate "S6E8AA0 DSI video mode panel"
-	depends on DRM && DRM_PANEL
 	depends on OF
 	select DRM_MIPI_DSI
 	select VIDEOMODE_HELPERS
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 6 lines · On Thursday 12 June 2014 16:50:15 Russell King wrote:

DRM_PANEL_LD9040 and DRM_PANEL_S6E8AA0 both explicitly depended on DRM_PANEL && DRM. This is nonsense for two reasons:

(a) DRM_PANEL already depends on DRM, so DRM_PANEL can not be enabled without DRM first being enabled. Hence the && DRM is useless.

Quoted 7 lines

(b) These two configs are already beneath a menu which depends on DRM_PANEL being enabled; these options will not be visible without DRM_PANEL already being enabled.

Let's just remove this unnecessary verbosity.

Unfortunately, this is wrong, because the current expression exploits one of the finer details of Kconfig syntax:

Quoted 12 lines
 drivers/gpu/drm/panel/Kconfig | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/panel/Kconfig +0 -1
index 4ec874da5668..44aea730b3aa 100644
@@ -18,14 +18,12 @@ config DRM_PANEL_SIMPLE
 
 config DRM_PANEL_LD9040
        tristate "LD9040 RGB/SPI panel"
-       depends on DRM && DRM_PANEL

drivers/gpu/drm/panel/Kconfig config DRM_PANEL_SIMPLE · line 29

Quoted 10 lines
drivers/gpu/drm/panel/Kconfig +0 -1
        depends on OF
        select SPI
        select VIDEOMODE_HELPERS
 
 config DRM_PANEL_S6E8AA0
        tristate "S6E8AA0 DSI video mode panel"
-       depends on DRM && DRM_PANEL
        depends on OF
        select DRM_MIPI_DSI
        select VIDEOMODE_HELPERS

DRM_PANEL is bool, while DRM is tristate. If DRM=m and DRM_PANEL=y, these two options can only be 'n' or 'm' but not 'y' with the current code, but they can be 'y' if you drop the explicit DRM dependency, which will cause a link failure.

The DRM_PANEL dependency can be removed, it is indeed unnecessary.

Arnd

#2 lore raw
Quoted 46 lines · Arnd Bergmann
Quoted 6 lines · On Thursday 12 June 2014 16:50:15 Russell King wrote:

DRM_PANEL_LD9040 and DRM_PANEL_S6E8AA0 both explicitly depended on DRM_PANEL && DRM. This is nonsense for two reasons:

(a) DRM_PANEL already depends on DRM, so DRM_PANEL can not be enabled without DRM first being enabled. Hence the && DRM is useless.

Quoted 7 lines

(b) These two configs are already beneath a menu which depends on DRM_PANEL being enabled; these options will not be visible without DRM_PANEL already being enabled.

Let's just remove this unnecessary verbosity.

Unfortunately, this is wrong, because the current expression exploits one of the finer details of Kconfig syntax:

Quoted 12 lines
 drivers/gpu/drm/panel/Kconfig | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/panel/Kconfig +0 -1
index 4ec874da5668..44aea730b3aa 100644
@@ -18,14 +18,12 @@ config DRM_PANEL_SIMPLE
 
 config DRM_PANEL_LD9040
        tristate "LD9040 RGB/SPI panel"
-       depends on DRM && DRM_PANEL

drivers/gpu/drm/panel/Kconfig config DRM_PANEL_SIMPLE · line 29

Quoted 10 lines
drivers/gpu/drm/panel/Kconfig +0 -1
        depends on OF
        select SPI
        select VIDEOMODE_HELPERS
 
 config DRM_PANEL_S6E8AA0
        tristate "S6E8AA0 DSI video mode panel"
-       depends on DRM && DRM_PANEL
        depends on OF
        select DRM_MIPI_DSI
        select VIDEOMODE_HELPERS

DRM_PANEL is bool, while DRM is tristate. If DRM=m and DRM_PANEL=y, these two options can only be 'n' or 'm' but not 'y' with the current code, but they can be 'y' if you drop the explicit DRM dependency, which will cause a link failure.

Quoted 1 line

The DRM_PANEL dependency can be removed, it is indeed unnecessary.

In which case, that's a bug for DRM_PANEL_SIMPLE which uses the same mechanism. Since everything is going to be in the same boat, the menu should depend on DRM && DRM_PANEL.

Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
#3 lore raw
Quoted 5 lines · On Thursday 12 June 2014 17:04:34 Russell King - ARM Linux wrote:

In which case, that's a bug for DRM_PANEL_SIMPLE which uses the same mechanism. Since everything is going to be in the same boat, the menu should depend on DRM && DRM_PANEL.

Right, I actually have a patch for DRM_PANEL_SIMPLE in my randconfig series that I haven't sent out. Making the menu depend on DRM is probably correct, but I haven't tried.

Arnd