From: "Christian König" <christian.koenig@amd.com>
To: Bernard Zhao <bernard@vivo.com>,
Alex Deucher <alexander.deucher@amd.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Ye Bin <yebin10@huawei.com>, Evan Quan <evan.quan@amd.com>,
Andriy Gapon <avg@FreeBSD.org>,
Luben Tuikov <luben.tuikov@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com
Subject: Re: [PATCH] amd/amdgpu: optimise CONFIG_X||CONFIG_X_MODULE to IS_ENABLED(X)
Date: Wed, 18 Nov 2020 09:19:52 +0100 [thread overview]
Message-ID: <e401f71f-4bfd-e4cb-c21d-addd6a2e90fe@amd.com> (raw)
In-Reply-To: <20201118034306.103427-1-bernard@vivo.com>
Am 18.11.20 um 04:43 schrieb Bernard Zhao:
> Optimise CONFIG_<X> || CONFIG_<X>_MODULE to IS_ENABLED(<X>).
> This change also fix check_patch.pl warning:
> WARNING: Prefer IS_ENABLED(<FOO>) to CONFIG_<FOO> ||
> CONFIG_<FOO>_MODULE
> +#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined
> (CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
>
> Signed-off-by: Bernard Zhao <bernard@vivo.com>
Acked-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 165b02e267b0..f1980cd1f402 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -64,7 +64,7 @@ struct amdgpu_atif {
> struct amdgpu_atif_notifications notifications;
> struct amdgpu_atif_functions functions;
> struct amdgpu_atif_notification_cfg notification_cfg;
> -#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
> +#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> struct backlight_device *bd;
> #endif
> struct amdgpu_dm_backlight_caps backlight_caps;
> @@ -447,7 +447,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
> DRM_DEBUG_DRIVER("ATIF: %d pending SBIOS requests\n", count);
>
> if (req.pending & ATIF_PANEL_BRIGHTNESS_CHANGE_REQUEST) {
> -#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
> +#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> if (atif->bd) {
> DRM_DEBUG_DRIVER("Changing brightness to %d\n",
> req.backlight_level);
> @@ -806,7 +806,7 @@ int amdgpu_acpi_init(struct amdgpu_device *adev)
> }
> adev->atif = atif;
>
> -#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
> +#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
> if (atif->notifications.brightness_change) {
> if (amdgpu_device_has_dc_support(adev)) {
> #if defined(CONFIG_DRM_AMD_DC)
prev parent reply other threads:[~2020-11-18 8:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 3:43 [PATCH] amd/amdgpu: optimise CONFIG_X||CONFIG_X_MODULE to IS_ENABLED(X) Bernard Zhao
2020-11-18 8:19 ` Christian König [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=e401f71f-4bfd-e4cb-c21d-addd6a2e90fe@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=avg@FreeBSD.org \
--cc=bernard@vivo.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=evan.quan@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luben.tuikov@amd.com \
--cc=opensource.kernel@vivo.com \
--cc=yebin10@huawei.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