Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4837800rwb; Tue, 6 Sep 2022 13:36:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR7z/xHLe3Z5jY2bjZrY8r6F42s0aDPTIoZw+fe4pD68yAuQtRnBwiaBoBX8c0Uz+ZISzwD6 X-Received: by 2002:a63:4522:0:b0:431:25fd:544b with SMTP id s34-20020a634522000000b0043125fd544bmr351322pga.595.1662496602740; Tue, 06 Sep 2022 13:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662496602; cv=none; d=google.com; s=arc-20160816; b=QHtYpMyAM1PnxJA+ruOv5L08FsH7zfLSBiAAie98hP6E+xLa0tkDwGpjIxhU6yZUVM zU2lUN5sFYKM9COF/3f/mNsHH50Ug9Wooi4UNVRoDLDid5QuHGK05XhOyzTpZzdvQOYr xwZd+vFlsGzqiJTRzDzj06K21A1TijCqVt5uHdK9g8J4o17a4iZBG6v+0Bo5t23JQ8NJ sQcfGoWC491GjFQU/hI6sEtMwA+ozWuuLMujnaN32RWsu8xDL9BjJDQY/VXqjVBhKVCw itjpYeMseFGkDIvAA6M8V4UCyAATJln+F+bRVu1r7V6b+V8aLmcOFBTUrHCWjCwZPVTv Tqbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hWB9slcYwP2VmWl1LPqyRezAmYmLuLNmb+c8lUEUpJw=; b=ahj7iKMDu01VQCCQWWBVr+Z1VBEqYuEpK8mERf7T3epCVfNG6snsHTJL/SLK4rwTz0 3MrjSGrrRTQA/Ld/pBfGv3zsa4xfjkohxTY163fXjZYABA/v0S17Okr3/aYxqACM2BG2 OAetwsDTkOzt5hDuFuCCUVRpgHm5LJYCerCBSm59GQGvxyI4v+UkgI9opfhMk7b8ESZj Dbay4metqScl+4yyBfWHKFbrUfQXga23rK50GCDvhEc7U7HoVeleGzzClt5o/gwUrxL2 SVJVJ/PiGgr37bpS1XHa4QOfKzeo9eLlUlFIzRk/T8rsL+3VpygLKLW1nKmjlTvC5sa/ cPWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aVLAGQzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r24-20020a63d918000000b0042b77c2ce6bsi14613316pgg.130.2022.09.06.13.36.30; Tue, 06 Sep 2022 13:36:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aVLAGQzt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiIFUUZ (ORCPT + 99 others); Tue, 6 Sep 2022 16:20:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbiIFUTn (ORCPT ); Tue, 6 Sep 2022 16:19:43 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4574BBA9E4 for ; Tue, 6 Sep 2022 13:17:28 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id x1so8029032plv.5 for ; Tue, 06 Sep 2022 13:17:28 -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=CUeHV2krukvT2F4hdqVib+Z5E6ETUZ9JmKNhC6DMET8HjOj4oSon8Sq0228NL/qlTH tQ8ViGWNq6PxS7hmjf0lgKQbH+ddOZWiRw5bO7ry/y1SFuxB8X+2spwoZTf7KngjSnD6 1pT/stTcPpcwFChLPcx8Qlebn4+EkYCVG1+HcZtu+2qute03QmqjLHG1c+Qx4KhAkRt2 +dtBLpSXq43fmVtIOfA5oSQaDhHDqsgMtl3T1hz45f3wyruy1YfeOxODsWFmgYAezvpF 8k5mga7E5YRTQtH/wLyB71UIXvXn40IMgxP4MYhPSsmt9QZpCjZoWKD8dtnGbTAi9GnH QJUg== X-Gm-Message-State: ACgBeo1zcb9vx9de/yPj6bhxVjBAVHSPbJqCZaqP6zmiC3gV4Srs0OK9 6LbHbHn4jMWVxX2WOq0qiDH9NA== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220901195055.1932340-1-nathan@kernel.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 >