Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2840454pxk; Tue, 15 Sep 2020 03:53:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKPU6dmXbDtigaYdqgB7aJ+qNq5d47VyPHlh/MPp9EKbnnfcVRhLY/+K8eK+Imq0lgE8rS X-Received: by 2002:a17:906:a985:: with SMTP id jr5mr20144245ejb.549.1600167216334; Tue, 15 Sep 2020 03:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600167216; cv=none; d=google.com; s=arc-20160816; b=mZ1OeHLAH7Z36EHDTnAkIHT/SNEI139e6/yQVi4T8CQypjjgb9YTkYHTC553b2F/6P cieCYbDBMXcu67a57eBzJPgBGbkKUxv48+jcb0r/JyIG0LElC2qCHo+lTZdtxXTkPIOv HPacPgROQ7MVXetX9BOHBjs6rhSV/UTyWPZIlqZ99oLojXUZwEkhkKeBhc4gy4yXUeTH ELv4+5BI1qoaOcLpm+qg7Blw2WrckMoRBcbaAwCx5T4AgqtjxC6+fljbcf7MPwBh/aeL jyXP4mPnlD2KAsagEgv+RnY53XCDobOVxgsqB2wMhOnNXjqluycXcWdqFK889YLrvxH3 ljdQ== 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=M10CfzmmoWV2go8wKGAHnJNLhTnjuJX157tLY3cbdOM=; b=PlTtVHebhAhfL8ViiNITFdkR/m8PpbJ8JboLrw1Lyc4X8+fE5zbhDjWoUUvbdHtY+J H3HLFyvz6ypH7HKpqZmMSTouuOGif0kknlXa5vtBcE9ow7gg1lMttlSL0gZsN1qHb4R7 gCt5C4uI3WUI/uNdX8oM/0Tiqu8BWWx+IuqWlRUJft7f8StO9Kox083ETT67zF+az4mi TvlV24C60xy9z18NwjyBRMppGp/B/V3pZ8RP9jl06avHa1jCxoeECngpT/W+cp53maSL ZD7oaXS6y9tIzRjToI8B2FIcIqSgSUQ86WYlK/v4xI1/RIL8ETpaNAzwFYiLhZkN0MuS hrCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=JurzQAL3; 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 y2si8607297ejc.669.2020.09.15.03.53.13; Tue, 15 Sep 2020 03:53:36 -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=JurzQAL3; 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 S1726265AbgIOKmk (ORCPT + 99 others); Tue, 15 Sep 2020 06:42:40 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:61760 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbgIOKmV (ORCPT ); Tue, 15 Sep 2020 06:42:21 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1600166541; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=M10CfzmmoWV2go8wKGAHnJNLhTnjuJX157tLY3cbdOM=; b=JurzQAL3nWij97jzbC1aD5PUVoZKmDM3x6uLWx7GR4VvKkIkelIL3VnzRZeF4x9z61pMqBvZ HkDQYXgoU1a0Xqf21YVkIWD5hJQ+x7zRn3NG75aFzC94h7hCBnOu1PVHZqoey9ZODAly5tZD Acr2W3otbO9/xgUAAgfSbadJ80g= X-Mailgun-Sending-Ip: 104.130.122.29 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-n01.prod.us-west-2.postgun.com with SMTP id 5f609a799bdf68cc035a0769 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 15 Sep 2020 10:42:01 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 79A42C43387; Tue, 15 Sep 2020 10:42:01 +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=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no 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 50ACBC433CA; Tue, 15 Sep 2020 10:41:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 50ACBC433CA 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=fail 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 v11 03/24] coresight: use IS_ENABLED for CONFIGs that may be modules Date: Tue, 15 Sep 2020 18:40:55 +0800 Message-Id: <20200915104116.16789-4-tingwei@codeaurora.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20200915104116.16789-1-tingwei@codeaurora.org> References: <20200915104116.16789-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 5fe773c4d6cc..28695e26e5c6 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -166,7 +166,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