Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp38466pxb; Tue, 17 Nov 2020 19:46:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxd8ZO3FpK+zxDq6igk2kGRTZzqkbKX2NK5Pf+zkuBpnIJPzZ//WIM2XfaHp9E7UOFuJGyf X-Received: by 2002:a17:907:2089:: with SMTP id pv9mr22716960ejb.34.1605671199939; Tue, 17 Nov 2020 19:46:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605671199; cv=none; d=google.com; s=arc-20160816; b=yQ/Y5JpV5S48shoVF/WG3uWFtQT5aSAEupa9e8K7jiL8GkximytLSPzZOdSI1fGPnn M6lMgUPAlrfmhMNzDX9uslD9rpyMqhGRqaJ8IhjMQQtvAQ/z83Wj5D1D1cjE0xyXUevN ymd4lvWL5JoIH10OElrkr59TS6u7Kuxuqz1RUXC5f7p+/+Gk2dEDlh8ASUdsFAv/Id6j MOd3N2KvxM0NKbaGAHoklnqcQY4vlDRHPfBL6fh+sAZZgfoOhPNxxTdnAlRo0nvS+suw koMqjoeld1bd00G58XwIjuXddWxgVO2TkZFuoQfY9mWsP3aZ+A79juWfjsJdkD4lOX00 bX5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hDR8g21xEfJIjQzm8GgHt5WZrbF7qtY4331/61rvLII=; b=MB3piwbphj+a3LYMGc1njh++lUXTUSSuvVj60DYLygQoTr/nTw2c0vUcn7CXiTUA92 7GBRmpJpG0h39wJgHIcq7H/ldGbLyfvx6dhsYHxI7oNj79Tf9zFc3IgvWN/pWQvHgZPv 8sGMmbU9fDmJMo7LkZrvNtX0wydGpjgskmIuvWMajQC758dIRHLOLa4udnezLE3XPC3W PnzMTReP3MgAPjM2TMdiva1leBMr41SQlHTq2MVbw+0kTNgugNNfLOt8Ax/be4M/KrM7 N7Wm+fIS6eI5mas8u3y7J1naxmwKragA8E5Tn/Bp9c9q5/itNemDmwVivoktsEWKKP5t kJrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si19148050edb.173.2020.11.17.19.46.16; Tue, 17 Nov 2020 19:46:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727065AbgKRDnQ (ORCPT + 99 others); Tue, 17 Nov 2020 22:43:16 -0500 Received: from m17618.mail.qiye.163.com ([59.111.176.18]:60332 "EHLO m17618.mail.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726989AbgKRDnP (ORCPT ); Tue, 17 Nov 2020 22:43:15 -0500 Received: from ubuntu.localdomain (unknown [157.0.31.125]) by m17618.mail.qiye.163.com (Hmail) with ESMTPA id D9ED74E1443; Wed, 18 Nov 2020 11:43:11 +0800 (CST) From: Bernard Zhao To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Ye Bin , Evan Quan , Andriy Gapon , Luben Tuikov , Bernard Zhao , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com Subject: [PATCH] amd/amdgpu: optimise CONFIG_X||CONFIG_X_MODULE to IS_ENABLED(X) Date: Tue, 17 Nov 2020 19:43:04 -0800 Message-Id: <20201118034306.103427-1-bernard@vivo.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZTRgZGhpKTkIZQ0NLVkpNS05NTEtCQklKTktVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hKTFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MBg6Ixw4AT8eLw9JIgovHksa ARhPCwFVSlVKTUtOTUxLQkJJTkJNVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlKTkxV S1VISlVKSU5ZV1kIAVlBSEhDTjcG X-HM-Tid: 0a75d972f8d79376kuwsd9ed74e1443 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Optimise CONFIG_ || CONFIG__MODULE to IS_ENABLED(). This change also fix check_patch.pl warning: WARNING: Prefer IS_ENABLED() to CONFIG_ || CONFIG__MODULE +#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined (CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) Signed-off-by: Bernard Zhao --- 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) -- 2.29.0