From: Daniel Vetter <daniel@ffwll.ch>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
dri-devel@lists.freedesktop.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/gma500: remove unnecessary config_enabled() guard
Date: Wed, 24 Aug 2016 07:40:12 +0200 [thread overview]
Message-ID: <20160824054012.GU10980@phenom.ffwll.local> (raw)
In-Reply-To: <1471970574-23906-1-git-send-email-yamada.masahiro@socionext.com>
On Wed, Aug 24, 2016 at 01:42:54AM +0900, Masahiro Yamada wrote:
> Commit d112a8163f83 ("gma500/cdv: Add eDP support") replaced the
> code inside this if-conditional with gma_backlight_set(), which
> becomes a nop stub if CONFIG_BACKLIGHT_CLASS_DEVICE is disabled.
> So, there is no need to guard the caller with config_enabled().
>
> Note:
> This is one of remaining TODOs to deprecate config_enabled() macro.
> Refer to commit 97f2645f358b ("tree-wide: replace config_enabled()
> with IS_ENABLED()").
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Applied to drm-misc, thanks.
-Daniel
> ---
>
> drivers/gpu/drm/gma500/opregion.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/opregion.c b/drivers/gpu/drm/gma500/opregion.c
> index ab696ca..eab6d88 100644
> --- a/drivers/gpu/drm/gma500/opregion.c
> +++ b/drivers/gpu/drm/gma500/opregion.c
> @@ -163,10 +163,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
> if (bclp > 255)
> return ASLE_BACKLIGHT_FAILED;
>
> - if (config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)) {
> - int max = bd->props.max_brightness;
> - gma_backlight_set(dev, bclp * max / 255);
> - }
> + gma_backlight_set(dev, bclp * bd->props.max_brightness / 255);
>
> asle->cblv = (bclp * 0x64) / 0xff | ASLE_CBLV_VALID;
>
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
prev parent reply other threads:[~2016-08-24 5:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 16:42 Masahiro Yamada
2016-08-24 5:40 ` Daniel Vetter [this message]
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=20160824054012.GU10980@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=akpm@linux-foundation.org \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/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
all inboxes | Powered by JetHome®