From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] drm/panel: remove unnecessary dependencies
Date: Thu, 12 Jun 2014 17:04:34 +0100 [thread overview]
Message-ID: <20140612160434.GL23430@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4955669.feOMdjBDuA@wuerfel>
On Thu, Jun 12, 2014 at 06:00:07PM +0200, Arnd Bergmann wrote:
> 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.
> >
> > (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.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Unfortunately, this is wrong, because the current expression
> exploits one of the finer details of Kconfig syntax:
>
> > drivers/gpu/drm/panel/Kconfig | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
> > index 4ec874da5668..44aea730b3aa 100644
> > --- a/drivers/gpu/drm/panel/Kconfig
> > +++ b/drivers/gpu/drm/panel/Kconfig
> > @@ -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
>
> 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.
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.
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.
next prev parent reply other threads:[~2014-06-12 16:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 15:50 [PATCH 1/2] drm/panel: remove unnecessary dependencies Russell King
2014-06-12 16:00 ` Arnd Bergmann
2014-06-12 16:04 ` Russell King - ARM Linux [this message]
2014-06-12 16:07 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140612160434.GL23430@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox