From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B65AC10F1A for ; Tue, 7 May 2024 04:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=blk2M2JewT+FrdKXlVRcRIY3QA4cRWbQap1pR5J6cAI=; b=AiNn+r6qYhongg QU7CmsyxVHpHphc3HCeWyLtKKdqIS0YQWfubd0ufZB8JIJkjSgdqVuSeOV0zACAN9fj129f8YCa9E mCg1Ci2fEkK67EH2oT24dIliNMYMeZflUIVOKHs+d9dvp+kLahwxbvxhUjNddsdyWdbAox75gkwSE vjCkcgeY6G5lhgGpatN66uZjuKukRq4y6YOtyZz7WpsU+2hks7uzb9PJw87rVqDua5Tku0suGLTuQ E7lI5B5PtIb9H/f/6BG4f/t5/Bn35r7u5w8rPpR/epHK2pYT6qvQvoiI2aZSCSoacy4KSqmEs9BDn 6YCLCuirfErFm0j+g+Lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4CFJ-00000009YZf-00km; Tue, 07 May 2024 04:16:05 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4CFG-00000009YYu-3tMA for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 04:16:04 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 47EB51042; Mon, 6 May 2024 21:16:28 -0700 (PDT) Received: from [10.163.33.37] (unknown [10.163.33.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 49A9A3F762; Mon, 6 May 2024 21:15:54 -0700 (PDT) Message-ID: <387feec3-79de-4b28-b2d5-d70d05b151b7@arm.com> Date: Tue, 7 May 2024 09:45:55 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 08/17] coresight: Remove unused stubs Content-Language: en-US To: James Clark , linux-perf-users@vger.kernel.org, gankulkarni@os.amperecomputing.com, scclevenger@os.amperecomputing.com, coresight@lists.linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org Cc: Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Will Deacon , Leo Yan , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com References: <20240429152207.479221-1-james.clark@arm.com> <20240429152207.479221-9-james.clark@arm.com> From: Anshuman Khandual In-Reply-To: <20240429152207.479221-9-james.clark@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240506_211603_105165_401970EA X-CRM114-Status: GOOD ( 15.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Minor nit: Should the subject line be "coresight: Remove unused etm perf stubs" ? On 4/29/24 20:51, James Clark wrote: > This file is never included anywhere if CONFIG_CORESIGHT is not set so > they are unused and aren't currently compile tested with any config so > remove them. Searching for this header's inclusion throws up the following source files, all of which needs CONFIG_CORESIGHT to be enabled to be compiled. git grep "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-core.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-etb10.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-etm-perf.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-etm3x-core.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-etm4x-core.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-syscfg.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-tmc-etf.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-tmc-etr.c:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/coresight-trbe.h:#include "coresight-etm-perf.h" drivers/hwtracing/coresight/ultrasoc-smb.c:#include "coresight-etm-perf.h" > > Signed-off-by: James Clark LGTM, with or without the subject line change. Reviewed-by: Anshuman Khandual > --- > .../hwtracing/coresight/coresight-etm-perf.h | 18 ------------------ > 1 file changed, 18 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.h b/drivers/hwtracing/coresight/coresight-etm-perf.h > index bebbadee2ceb..744531158d6b 100644 > --- a/drivers/hwtracing/coresight/coresight-etm-perf.h > +++ b/drivers/hwtracing/coresight/coresight-etm-perf.h > @@ -62,7 +62,6 @@ struct etm_event_data { > struct list_head * __percpu *path; > }; > > -#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); > @@ -77,23 +76,6 @@ static inline void *etm_perf_sink_config(struct perf_output_handle *handle) > int etm_perf_add_symlink_cscfg(struct device *dev, > struct cscfg_config_desc *config_desc); > void etm_perf_del_symlink_cscfg(struct cscfg_config_desc *config_desc); > -#else > -static inline int etm_perf_symlink(struct coresight_device *csdev, bool link) > -{ return -EINVAL; } > -int etm_perf_add_symlink_sink(struct coresight_device *csdev) > -{ return -EINVAL; } > -void etm_perf_del_symlink_sink(struct coresight_device *csdev) {} > -static inline void *etm_perf_sink_config(struct perf_output_handle *handle) > -{ > - return NULL; > -} > -int etm_perf_add_symlink_cscfg(struct device *dev, > - struct cscfg_config_desc *config_desc) > -{ return -EINVAL; } > -void etm_perf_del_symlink_cscfg(struct cscfg_config_desc *config_desc) {} > - > -#endif /* CONFIG_CORESIGHT */ > - > int __init etm_perf_init(void); > void etm_perf_exit(void); > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel