From patchwork Thu Sep 1 19:50:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 12963186 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 D7109ECAAD3 for ; Thu, 1 Sep 2022 19:52:17 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=x4fFwnsRGuIkQh1Zn5PVPiz3lhdK0iYeKtIhoimRcYI=; b=zvWeXePG2EiVId yXPn7tKufOmIwKwGt2Ybw65KD4TnbTFnB+v3FZwM+82aRR/ygoKCJN3WExj5FqW5cLfYSRDw9CyzS +iQHsosBZjf0FlofyUPee16YtevxL5ZftXJcFb4yexLM+Qh3L++uizi6hNJ7fGvM1W1/aUY16JvvQ QQEsoiea+LpqiCeY38rtFyszS98X1eM2o5c+wSEThMVcJoFTk6W56/0qGU9ybhh9uauUWawu5v+66 n4s+imiJ5m48FiTOJwM2hNY4zKowaRlqLS3YLtw7c7hshjxwhnopQ5hXEN8jGHEKA+9uIjAVpjQF7 iljLGCZSHH2MmwIzSTNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTqDZ-00EL5D-LS; Thu, 01 Sep 2022 19:51:13 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oTqDU-00EL16-34 for linux-arm-kernel@lists.infradead.org; Thu, 01 Sep 2022 19:51:11 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 74534B828FE; Thu, 1 Sep 2022 19:51:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D788C433D6; Thu, 1 Sep 2022 19:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662061864; bh=ek561zrci+T240jIRlvhhGht6fexDVv5DyBcQ95A8eQ=; h=From:To:Cc:Subject:Date:From; b=eOfQWYh+HJ+GIyfaZcOMEBACc4xr2LnMz3ApFSvfQaS3B4qarCBf/2bnRUIIgMd1J PO7tyNwhFPYBCLmyh+2h6ZLOwGXfnU0fp9mrGIfjOpOz9cQNB79/JLWl4MBGjBjoBa d8G4tIOXKksBA3BD87+xqnZJqtvQvezkpYQ6XEaG2Jf5CrKIfSP43kiZc91sZz9jQt w8CbyuCiQK+6xwUt5nVZp5UpGUv9H337SrOED2gRkr943hWRkcx7ohePiy4TRnyQ8E Co66Urd8RxpVpvCdC//OQLnXOyLsaKpjUcsvz4aOuBDq06BGj4v4b3ca+TxBuHaE8C TZFtE2vHuIcsA== From: Nathan Chancellor To: Mathieu Poirier , Suzuki K Poulose Cc: Mike Leach , Leo Yan , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Nathan Chancellor Subject: [PATCH] coresight: cti-sysfs: Mark coresight_cti_reg_store() as __maybe_unused Date: Thu, 1 Sep 2022 12:50:55 -0700 Message-Id: <20220901195055.1932340-1-nathan@kernel.org> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220901_125108_320459_52666A24 X-CRM114-Status: GOOD ( 14.29 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When building without CONFIG_CORESIGHT_CTI_INTEGRATION_REGS, there is a warning about coresight_cti_reg_store() being unused in the file: drivers/hwtracing/coresight/coresight-cti-sysfs.c:184:16: warning: 'coresight_cti_reg_store' defined but not used [-Wunused-function] 184 | static ssize_t coresight_cti_reg_store(struct device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~ This is expected as coresight_cti_reg_store() is only used in the coresight_cti_reg_rw macro, which is only used in a block guarded by CONFIG_CORESIGHT_CTI_INTEGRATION_REGS. Mark coresight_cti_reg_store() as __maybe_unused to clearly indicate that the function may be unused depending on the configuration. Fixes: fbca79e55429 ("coresight: cti-sysfs: Re-use same functions for similar sysfs register accessors") Signed-off-by: Nathan Chancellor Reviewed-by: James Clark --- drivers/hwtracing/coresight/coresight-cti-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) base-commit: 0a98181f805058773961c5ab3172ecf1bf1ed0e1 diff --git a/drivers/hwtracing/coresight/coresight-cti-sysfs.c b/drivers/hwtracing/coresight/coresight-cti-sysfs.c index 478b8d38b744..6d59c815ecf5 100644 --- a/drivers/hwtracing/coresight/coresight-cti-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-cti-sysfs.c @@ -181,9 +181,9 @@ static ssize_t coresight_cti_reg_show(struct device *dev, } /* Write registers with power check only (no enable check). */ -static ssize_t coresight_cti_reg_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t size) +static __maybe_unused ssize_t coresight_cti_reg_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t size) { struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent); struct cs_off_attribute *cti_attr = container_of(attr, struct cs_off_attribute, attr);