All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Thompson <daniel.thompson@linaro.org>,
	Meghana Madhyastha <meghana.madhyastha@gmail.com>,
	daniel@ffwll.ch, noralf@tronnes.org,
	outreachy-kernel@googlegroups.com,
	dri-devel@lists.freedesktop.org, Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH v7 1/3] backlight: Add IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
Date: Mon, 02 Oct 2017 12:46:44 +0300	[thread overview]
Message-ID: <87infx6fwb.fsf@intel.com> (raw)
In-Reply-To: <e0b74c8d-9454-4519-816b-2c580ad59b2a@linaro.org>

On Mon, 02 Oct 2017, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> On 02/10/17 09:49, Jani Nikula wrote:
>> On Mon, 02 Oct 2017, Daniel Thompson <daniel.thompson@linaro.org> wrote:
>>> On 01/10/17 18:26, Meghana Madhyastha wrote:
>>>> -#ifdef CONFIG_OF
>>>> +#if defined CONFIG_OF && IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>>>
>>> The above comments are more important but why does this mix defined and
>>> IS_ENABLED? Couldn't they both use defined (and preferably with the
>>> optional brackets around the CONFIG_ symbol).
>> 
>> No, always use IS_ENABLED() for tristates when you want to match 'y' or
>> 'm'.
>
> Oops.
>
> Actually it was the mis-match in the original code that attracted my 
> attention (defined on one side, IS_ENABLED() on the other)... I'd be 
> happier if both used the same approach.

Agreed.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center


WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Daniel Thompson <daniel.thompson@linaro.org>,
	Meghana Madhyastha <meghana.madhyastha@gmail.com>,
	daniel@ffwll.ch, noralf@tronnes.org,
	outreachy-kernel@googlegroups.com,
	dri-devel@lists.freedesktop.org, Lee Jones <lee.jones@linaro.org>
Subject: Re: [PATCH v7 1/3] backlight: Add IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
Date: Mon, 02 Oct 2017 12:46:44 +0300	[thread overview]
Message-ID: <87infx6fwb.fsf@intel.com> (raw)
In-Reply-To: <e0b74c8d-9454-4519-816b-2c580ad59b2a@linaro.org>

On Mon, 02 Oct 2017, Daniel Thompson <daniel.thompson@linaro.org> wrote:
> On 02/10/17 09:49, Jani Nikula wrote:
>> On Mon, 02 Oct 2017, Daniel Thompson <daniel.thompson@linaro.org> wrote:
>>> On 01/10/17 18:26, Meghana Madhyastha wrote:
>>>> -#ifdef CONFIG_OF
>>>> +#if defined CONFIG_OF && IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
>>>
>>> The above comments are more important but why does this mix defined and
>>> IS_ENABLED? Couldn't they both use defined (and preferably with the
>>> optional brackets around the CONFIG_ symbol).
>> 
>> No, always use IS_ENABLED() for tristates when you want to match 'y' or
>> 'm'.
>
> Oops.
>
> Actually it was the mis-match in the original code that attracted my 
> attention (defined on one side, IS_ENABLED() on the other)... I'd be 
> happier if both used the same approach.

Agreed.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-10-02  9:47 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-01 17:24 [PATCH v7 0/3] drm/tinydrm: drm_of_find_backlight helper Meghana Madhyastha
2017-10-01 17:24 ` Meghana Madhyastha
2017-10-01 17:26 ` [PATCH v7 1/3] backlight: Add IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) Meghana Madhyastha
2017-10-01 17:26   ` Meghana Madhyastha
2017-10-02  5:58   ` Daniel Thompson
2017-10-02  5:58     ` Daniel Thompson
2017-10-02  5:59     ` Daniel Thompson
2017-10-02  5:59       ` Daniel Thompson
2017-10-02  8:49     ` Jani Nikula
2017-10-02  8:49       ` Jani Nikula
2017-10-02  9:36       ` Daniel Thompson
2017-10-02  9:36         ` Daniel Thompson
2017-10-02  9:46         ` Jani Nikula [this message]
2017-10-02  9:46           ` Jani Nikula
2017-10-02  9:00     ` Jani Nikula
2017-10-02  9:00       ` Jani Nikula
2017-10-03  8:03       ` Daniel Vetter
2017-10-03  8:03         ` Daniel Vetter
2017-10-03  8:51         ` Daniel Thompson
2017-10-03  8:51           ` Daniel Thompson
2017-10-03  9:04           ` Daniel Vetter
2017-10-03  9:04             ` Daniel Vetter
2017-10-06 18:01             ` Noralf Trønnes
2017-10-06 18:01               ` Noralf Trønnes
2017-10-09  9:06               ` Daniel Thompson
2017-10-09  9:06                 ` Daniel Thompson
2017-10-09 15:35                 ` Noralf Trønnes
2017-10-09 15:35                   ` Noralf Trønnes
2017-10-01 17:28 ` [PATCH v7 2/3] drm/tinydrm: Move tinydrm_of_find_backlight into drm_of.c Meghana Madhyastha
2017-10-01 17:28   ` Meghana Madhyastha
2017-10-01 17:29 ` [PATCH v7 3/3] drm/tinydrm: Add devres versions of drm_of_find_backlight Meghana Madhyastha
2017-10-01 17:29   ` Meghana Madhyastha

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=87infx6fwb.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lee.jones@linaro.org \
    --cc=meghana.madhyastha@gmail.com \
    --cc=noralf@tronnes.org \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.