Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1745713pxa; Thu, 20 Aug 2020 20:47:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVhRWFS/aHSqtaNFkwnq0hS09X7j/t7rTwZNjpillfhyOOZHC0UJNgXb/eoqSw3tvgqdJG X-Received: by 2002:a17:906:6558:: with SMTP id u24mr958331ejn.364.1597981671140; Thu, 20 Aug 2020 20:47:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597981671; cv=none; d=google.com; s=arc-20160816; b=EAtqmgDMlu8+/MUTSHcs0RtHZQF5Mu9YEF25Yg5z+r7tklbdwqExnAZkCFvx6P0wT7 Le5l56gegtl1LYHFROmZD5OA56p1zyoCH0l+HR5NltNgViixl2lrWODbao+VoQGFde3F My86U4sI+Boh6QtBpxb7ol7WOuStIEESGOktRsFLDnXgdAtn9sEny2lRO0XK8UgKaaeL U9bJ6RmZ+OC4BUSROPrrAVRxu5uUCFJJd5UVmqwVcjRZ1c9IJmB+j5NuF7PTuho/Mj1v b3rZIA3QMOb5+x1Ane3Q0P98JH0ieur7jVuZ1rIiBXRM8rayJapkV5YUkfQuP7WO0Aaa TbvA== 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=uz+BW+Qo+KZdeIMIh9F6deRmVUIHaD2luecK3VyuHWN8UWAi62xqocFkZmJ44bcd7G ZW1e4j2RvgxrYrhtlsDq3nsA21ETkNWpxBoF9fIProJohj29sflLz2fwci9TfXe2tH/5 pVx5lh+zUGbQx6ufUpn5qUjYrqU8YxsDi+OxpOi+vdyIZ0FK6/U1BJuPNOedyt04XW4K T6VcP92QqonUvnWh9ouXE7iA+FmCxEXbViF0N/ea8rxense3VQEEqjQcQ/jkl8dMTBTQ NriIqCQrkFYMnkJLSJbefR2H45FyiAcrBqC6gFXzk4ZlyGxDu1AOd44MbSN4O9zFasLH HmaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Tu6t4+de; 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 a3si357007ejc.80.2020.08.20.20.47.27; Thu, 20 Aug 2020 20:47:51 -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=Tu6t4+de; 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 S1727957AbgHUDqL (ORCPT + 99 others); Thu, 20 Aug 2020 23:46:11 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:20819 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbgHUDqE (ORCPT ); Thu, 20 Aug 2020 23:46:04 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597981563; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=E4tgfIUmQgTARzHHWslv8bK34Zyfjsi8x+gcu7MVJTE=; b=Tu6t4+depkxylhjYVgsw8Q8d9c5EzC4OJD2eo1jFYND7MVWih6RJfMOOJnfUjtebueo0eVjN dMjsZ9S5URz9NBw86dHcjBoon2IiSsAxxiH23mp1WUPqrrIupHRe6WOrH70I+ibEUz+LonQa QPiTMTLBrK3TJWrkJS66JEsKSzk= 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-n02.prod.us-west-2.postgun.com with SMTP id 5f3f434f108e5ef85abb0bab (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 21 Aug 2020 03:45:19 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id DD8DEC433B2; Fri, 21 Aug 2020 03:45:19 +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 5EC88C433CB; Fri, 21 Aug 2020 03:45:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5EC88C433CB 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 v10 03/24] coresight: use IS_ENABLED for CONFIGs that may be modules Date: Fri, 21 Aug 2020 11:44:24 +0800 Message-Id: <20200821034445.967-4-tingwei@codeaurora.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20200821034445.967-1-tingwei@codeaurora.org> References: <20200821034445.967-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