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 55A3CECAAA1 for ; Tue, 6 Sep 2022 20:18:35 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V2GYmmfRUAdBRYwmlSuictQwEOJ9abCDdqzeTpGtC9s=; b=wM4Ur9yULNwSW3 1Vz0UWbIvPjsPz4KV8e1bzVZEBJ6ONy99lHTpBMGNHDC+joiFdOS632BfWEUk0k6zwYmdvu+ql7NF rGzlcQwB9mo3I5YReNVYCGfE68N//M0CFIPPihIU1Zejvk9kIK5MJQMrvIqTSSjwOHtuOOmP4HnJX O1VpzVxTFdTt+iMoRUGHbSBLHYubFIfDnb2gG+rpobv7s3KaKPqEVbZ0gIbWHgceN6srHoTcE7QwJ qlGeIUh55YyUS82EZcseMIbTURS8qTPGT0gmr07mIrsmWYNQwh+Ui2l5lln3LB3nBq9nKzL08ZW8I 3rZtt4p3t/Krta1GgheQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVf0n-00H3u4-S8; Tue, 06 Sep 2022 20:17:34 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oVf0k-00H3qf-BS for linux-arm-kernel@lists.infradead.org; Tue, 06 Sep 2022 20:17:31 +0000 Received: by mail-pl1-x631.google.com with SMTP id 9so9163360plj.11 for ; Tue, 06 Sep 2022 13:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=hWB9slcYwP2VmWl1LPqyRezAmYmLuLNmb+c8lUEUpJw=; b=aVLAGQztiiEZT9g/oIw0tbOv4wDZuuhTdLD8dkimdnHimZyy/A2xvYTC30XFcy/5Oq qnL3cBMNLZY4AoYKS2rwsm5bTddwRLfCmSB/dfZ6+FCeoeu7m52TvNvuca78nRK+psDZ Ea14tBuRdZgXTg6VxbC3Sm1yQTEvR9BV4ZevWE9Bj3KON4LuvZ1sX1ZgoLKufdswL7f1 Ykej6q2jVNuECUZi6l57snUxD4QiwXa2O+YWmnk3glcRISN8Pcg6qMUFj2KeMUpzXqWn uKJY3ekJBCbEpqNiOkxudhgtvYQOkXiZ9gdri0op8tva3aOzHIGAeGjhmjhgM0kqrk7J nafw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=hWB9slcYwP2VmWl1LPqyRezAmYmLuLNmb+c8lUEUpJw=; b=Z6aq0T0lhXKouvJmqnPs/O0zMii3r4M9NMZhnZ8NlQUlImbfHGZs/paKVX6XHYGNJ/ PQCxeeeq3ygoBBWniJfuAEUSJxLugryH2gQTeiuNgT8RtO9THaDDjcdwSqpO/W/hAbg7 1SlckkFlPaCUGAHmeeqQp/IbW8vHLje29ZxWVrqF89YVch2k4L5dTwTEXOzhrFF2asgd AH1nD7qW6FQU2A1eklez0M8gt/1H/JRDpy+eC6jP3XT/X2Rx9qKncHTQwGyYuDBBq9/P w1Oma3OyGe/T3z/nKeBQT+yEdfpRdbw8yB0vqPOXwtTlaKyPL2Xy5zO249Iu1FTcYaBg ZUcw== X-Gm-Message-State: ACgBeo13oHbwtIG2Oe7JXMJ23Z1nmN3BAviHl0xo/53jBD3S2Ndd3Sli Mj+WuKD1BaW2/moaLnuKpFYFPg== X-Google-Smtp-Source: AA6agR7LhafKa5Nv1FqEJg3a0DDqCuP7aynhBww/aEou/6EENnvU8IULAvRWdpUt6JfQ0aOWZTHAaw== X-Received: by 2002:a17:90b:3901:b0:1fd:99f6:68c with SMTP id ob1-20020a17090b390100b001fd99f6068cmr26532549pjb.5.1662495447359; Tue, 06 Sep 2022 13:17:27 -0700 (PDT) Received: from p14s (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id b7-20020aa78ec7000000b00537fb1f9f25sm10723603pfr.110.2022.09.06.13.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 13:17:25 -0700 (PDT) Date: Tue, 6 Sep 2022 14:17:23 -0600 From: Mathieu Poirier To: Nathan Chancellor Cc: Suzuki K Poulose , Mike Leach , Leo Yan , James Clark , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coresight: cti-sysfs: Mark coresight_cti_reg_store() as __maybe_unused Message-ID: <20220906201723.GA70736@p14s> References: <20220901195055.1932340-1-nathan@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220901195055.1932340-1-nathan@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220906_131730_436301_DCB0C209 X-CRM114-Status: GOOD ( 22.51 ) 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 On Thu, Sep 01, 2022 at 12:50:55PM -0700, Nathan Chancellor wrote: > 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 > --- > drivers/hwtracing/coresight/coresight-cti-sysfs.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > 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) > { Applied. Thanks, Mathieu > struct cti_drvdata *drvdata = dev_get_drvdata(dev->parent); > struct cs_off_attribute *cti_attr = container_of(attr, struct cs_off_attribute, attr); > > base-commit: 0a98181f805058773961c5ab3172ecf1bf1ed0e1 > -- > 2.37.3 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel