Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp994443pxa; Wed, 19 Aug 2020 22:52:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+quIN9Xr7WdyqjWY2W4X3haHzmMCoxk7cq1qmN/13PHq/DcioUBxeNUNZT14kEsqpiKm0 X-Received: by 2002:aa7:d818:: with SMTP id v24mr1400988edq.259.1597902726355; Wed, 19 Aug 2020 22:52:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597902726; cv=none; d=google.com; s=arc-20160816; b=sV0Ho6yyyiF4IDg3f6ZLDriwVSBuhBt/MwGMxoWdzUOecuQqGqPmlmIE5WzwFFwcwz 0Nhf8vGMA15Zb3KVi6thLML/VgIOZLUTIVvWPahawtJtcKcJFyCp/uGWa0DCJH3L9r2C fFFRrupHlKi7SDiO50rk/ddg3WVsfgCgpF3QAsDLmmp3lnE6BCNIB6f9yFZ3PzaN/EY0 UNft8+jv5SPaIDvcfDUK9kUEqJYJosd94Pm8r3rwH3VqcQVGKkMMBxQOHwMbqiFKZI/H jNKCfpGzGkRoNedgkGez87IasGk4x1qOIfCEAPbHGPyD3Va7O4XbwTGdF/LmSh7okFAt 0BcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=E4tgfIUmQgTARzHHWslv8bK34Zyfjsi8x+gcu7MVJTE=; b=UiNYtmX8sov2AA5fnVgDLFXYPPC67UbR1SCv8JNK2QpMw6CObpK6tleQ7LV5h2s067 mty/jcGPo3eB1fOwj7PjGDOKatr1aAguPtqQZlurIJLQYOQSZV1DCk7IpDYUsIO+k8kL BzEXKU03mfKpgV3jJVNTHcpMSLIesCNS4uMdtlavf6uqptKfRMTi+/NXJCBN/eV15F4w pXWm3d7XV8xlUlO4Qo4Js9E22+4WT9mRuWNzNmF+881HWN2W50OVMEXhnLx6A3FRkNnK vnPoBwDbJB2LwdmudOywuk+HvBRLPM3ZGIRExOyg4ohHCxULpQCYrHuSZvjNgWUra4Va tReA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=DeKkUMwe; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si581257ejr.700.2020.08.19.22.51.42; Wed, 19 Aug 2020 22:52:06 -0700 (PDT) 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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=DeKkUMwe; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727079AbgHTFs1 (ORCPT + 99 others); Thu, 20 Aug 2020 01:48:27 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:55879 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726809AbgHTFsN (ORCPT ); Thu, 20 Aug 2020 01:48:13 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597902493; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=E4tgfIUmQgTARzHHWslv8bK34Zyfjsi8x+gcu7MVJTE=; b=DeKkUMweS6nX21UOQsOmvhgyw5jeIgJLT+k98f1SFSeWWbYwVFG0GaQHu9ncavuhEwnwFqz9 vi4in/S9lou0Wm7CJTIz/Hz9NvanNeBUMaDe/0fjUDaQmnhkMLY48ILB248zxQ2xaFgXQLAl 35mEYtlIVoIVvZp+9hmPRGlEKUg= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n06.prod.us-west-2.postgun.com with SMTP id 5f3e0e8ec651aed294ebb03f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 20 Aug 2020 05:47:58 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 222ABC433A0; Thu, 20 Aug 2020 05:47:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from tingweiz-gv.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tingwei) by smtp.codeaurora.org (Postfix) with ESMTPSA id 16FA0C4344A; Thu, 20 Aug 2020 05:47:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 16FA0C4344A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=tingwei@codeaurora.org From: Tingwei Zhang To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Mike Leach Cc: Kim Phillips , Greg Kroah-Hartman , Leo Yan , Randy Dunlap , Russell King , Mian Yousaf Kaukab , tsoni@codeaurora.org, Sai Prakash Ranjan , Mao Jinlong , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Suzuki K Poulose , Tingwei Zhang Subject: [PATCH v9 03/24] coresight: use IS_ENABLED for CONFIGs that may be modules Date: Thu, 20 Aug 2020 13:46:57 +0800 Message-Id: <20200820054718.20115-4-tingwei@codeaurora.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20200820054718.20115-1-tingwei@codeaurora.org> References: <20200820054718.20115-1-tingwei@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kim Phillips Checking for ifdef CONFIG_x fails if CONFIG_x=m. Use IS_ENABLED that is true for both built-ins and modules, instead. Required when building coresight components as modules. Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm-perf.h | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 2 +- include/linux/coresight.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.h b/drivers/hwtracing/coresight/coresight-etm-perf.h index 015213abe00a..05f89723e282 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.h +++ b/drivers/hwtracing/coresight/coresight-etm-perf.h @@ -57,7 +57,7 @@ struct etm_event_data { struct list_head * __percpu *path; }; -#ifdef CONFIG_CORESIGHT +#if IS_ENABLED(CONFIG_CORESIGHT) int etm_perf_symlink(struct coresight_device *csdev, bool link); int etm_perf_add_symlink_sink(struct coresight_device *csdev); void etm_perf_del_symlink_sink(struct coresight_device *csdev); diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index f2dc625ea585..d801a2755432 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -165,7 +165,7 @@ int coresight_make_links(struct coresight_device *orig, void coresight_remove_links(struct coresight_device *orig, struct coresight_connection *conn); -#ifdef CONFIG_CORESIGHT_SOURCE_ETM3X +#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM3X) extern int etm_readl_cp14(u32 off, unsigned int *val); extern int etm_writel_cp14(u32 off, u32 val); #else diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 58fffdecdbfd..3bb738f9a326 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -324,7 +324,7 @@ struct coresight_ops { const struct coresight_ops_ect *ect_ops; }; -#ifdef CONFIG_CORESIGHT +#if IS_ENABLED(CONFIG_CORESIGHT) extern struct coresight_device * coresight_register(struct coresight_desc *desc); extern void coresight_unregister(struct coresight_device *csdev); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project