Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9701157rwp; Thu, 20 Jul 2023 08:31:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlFZ7pYrGz+Un01avLeiNNdF9Bnm+OyOIeA7d1satMTQP6CHvbOL9zKK2diB+0u9RXDorKbn X-Received: by 2002:a17:902:e5cd:b0:1bb:14e7:4fdf with SMTP id u13-20020a170902e5cd00b001bb14e74fdfmr2920692plf.22.1689867117873; Thu, 20 Jul 2023 08:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689867117; cv=none; d=google.com; s=arc-20160816; b=ZgovXbd1M+JZPpVpdZK4RCs+p5P8BL2BkvioQlAe3wc7hlfiu/+3pWVcrZRBO481at ww3fhmn7T9YA9jgkfStp0e2ZDrUhoL6YwH8skWAfKCT044BSAvFMOt/T2Hf7h1gWggto WLEs9RsLiscFcWw3utPS+2T9LRStWRiQWdJauKYARHwP7K6tKq8gUJEtIvAgCG5Ai82B jJ3iB+o1jlVB3Bg8atNNp3ybf1fn2Knb+f0oN/R85lr1P7/xlKjOIhH60kEuauvqjSCU a3pGhDy/IOfEuD36nXkF7+9pXyPkDMbGH1AkZ/NSeaGUh+OAzgv2AO3eLKAB3zN2Z8rC Bz/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=EH5XJadTjYUCZPX5UHJQBVA28A6Iz0OEGos6BVFZVHw=; fh=YiJmrthNFcQPe29FbEzSGd2zkyFAj8i4BmVP04L4raQ=; b=mQhikHbh3+4prx/cDJ2016zHYitDFeoS578IMtr4LW1ZGo/pFwU88VVrJyt7jxjXAQ ucLRsfN/j1AEwEtQTUEZeHrpnur3WncU5a8AJbk9LqH8YF4tmVbO+d8kMLBCffy04WFu 9/oMnMc72v13FitO+2hmVJ1IHdo2tca9tqFTdEiPxMwxWXUf5A7/yp3IWRiGcb2+3NL9 BPpBgZrGMJa2cz2souts/I/eAEMjeluVWn02UtE3sTn17dS/4qcMP/MX3Oae7AxT5Z5n amMZ6KIYxOjCyn6uVAZF2jZI9rYaMtkePZidpCi8NLN8OGwsGWGOL4EmmE9m+54W/cZ4 VHyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=tSC2U4Jr; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l2-20020a170903244200b001b54bdd6412si1173725pls.396.2023.07.20.08.31.44; Thu, 20 Jul 2023 08:31:57 -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=@bgdev-pl.20221208.gappssmtp.com header.s=20221208 header.b=tSC2U4Jr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232176AbjGTPYC (ORCPT + 99 others); Thu, 20 Jul 2023 11:24:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbjGTPYA (ORCPT ); Thu, 20 Jul 2023 11:24:00 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3752C268F for ; Thu, 20 Jul 2023 08:23:59 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2b6f97c7115so13543591fa.2 for ; Thu, 20 Jul 2023 08:23:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20221208.gappssmtp.com; s=20221208; t=1689866637; x=1690471437; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=EH5XJadTjYUCZPX5UHJQBVA28A6Iz0OEGos6BVFZVHw=; b=tSC2U4Jr5y1+wh2Mb5Bdb0MhaB0/k0NaklotQi7CQjr9fXtQoh4MnlSb8JXnxqcezs kZz3e3sVkp/puKrYAFTViH9WvT5i+BHMCCXQWX1exoIxO2ICjFVl4NvzHbwAguNan0E+ JzzcV4zy9IfAv07PLb5IGqvvzIriOFJrvItxLUmrnMil6zR/qWTbJHknU2vO8A7c7OWe cvWAP1XHGVeYlZzHSaSpfMuK1IB6NcDXSvhXAUlmMw9W5+2LVJ6GltWycftoV36Aezvs 9L7xBgi32/zccz98FQwvMwFHJ4LDI3+hRkspkVRygSp9cywlsvKfNuAAchQ6s9ughWoR a8cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689866637; x=1690471437; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EH5XJadTjYUCZPX5UHJQBVA28A6Iz0OEGos6BVFZVHw=; b=d7GFM2M0jurkOFTfcynilN5hXN4dITJR3VGg2mHOQOpBxIXHOTiXWicSRUyhlFNkrm KO8pt6t0fvelmPY5X6VHcv6TC6hy1VDQ8lZuiCV/mEoooxcMur0NZfG8KGYR8njNkVPL 9bsQ2xLEJFU2lgPFPOTufZtxNkxNeWAhrqiGfZ+pVg+kW5/oa5DhVareGOyW8vgRvQfq 1iw5YMPpquGaAVqPlhXNdIApm/Jyxfh6P2smKD5OQxCk7m2gX6ukrAv+zeXJhuMHM6/n /RQ3641WtuY0NQytAmuLh0SRHQd/JZJ0KnlndeNeV3tY2sw72SXSrspmozIdCm5Hu4yb iH3A== X-Gm-Message-State: ABy/qLZ074Z2IhBUcnHQmv7EyoL4bzfZt57mNyjF4ypGzLEukHFYJtvf oAuu5NUNhT9sDrzOugVao9o4MVet+j8QjtPLVdA/dg== X-Received: by 2002:a2e:7c12:0:b0:2b6:de59:1ba4 with SMTP id x18-20020a2e7c12000000b002b6de591ba4mr2326446ljc.20.1689866637429; Thu, 20 Jul 2023 08:23:57 -0700 (PDT) MIME-Version: 1.0 References: <20230718193913.3578660-1-arnd@kernel.org> In-Reply-To: <20230718193913.3578660-1-arnd@kernel.org> From: Bartosz Golaszewski Date: Thu, 20 Jul 2023 17:23:45 +0200 Message-ID: Subject: Re: [PATCH] gpio: mxc: fix unused function warnings To: Arnd Bergmann Cc: Linus Walleij , Andy Shevchenko , Shenwei Wang , Arnd Bergmann , Andy Shevchenko , Marek Vasut , Marc Zyngier , Dan Carpenter , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, 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 Tue, Jul 18, 2023 at 9:39=E2=80=AFPM Arnd Bergmann wro= te: > > From: Arnd Bergmann > > The new runtime PM support causes a harmless warning about > unused functions when runtime PM is disabled: > > drivers/gpio/gpio-mxc.c:612:12: error: 'mxc_gpio_runtime_resume' defined = but not used [-Werror=3Dunused-function] > drivers/gpio/gpio-mxc.c:602:12: error: 'mxc_gpio_runtime_suspend' defined= but not used [-Werror=3Dunused-function] > > Change the driver to use the more modern helper macros that avoid these > warnings, and remove the now unnecessary __maybe_unused annotations > > Fixes: 3283d820dce64 ("gpio: mxc: add runtime pm support") > Signed-off-by: Arnd Bergmann > --- > drivers/gpio/gpio-mxc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c > index a9fb6bd9aa6f9..e03fc8d375fe1 100644 > --- a/drivers/gpio/gpio-mxc.c > +++ b/drivers/gpio/gpio-mxc.c > @@ -623,7 +623,7 @@ static int mxc_gpio_runtime_resume(struct device *dev= ) > return 0; > } > > -static int __maybe_unused mxc_gpio_noirq_suspend(struct device *dev) > +static int mxc_gpio_noirq_suspend(struct device *dev) > { > struct platform_device *pdev =3D to_platform_device(dev); > struct mxc_gpio_port *port =3D platform_get_drvdata(pdev); > @@ -634,7 +634,7 @@ static int __maybe_unused mxc_gpio_noirq_suspend(stru= ct device *dev) > return 0; > } > > -static int __maybe_unused mxc_gpio_noirq_resume(struct device *dev) > +static int mxc_gpio_noirq_resume(struct device *dev) > { > struct platform_device *pdev =3D to_platform_device(dev); > struct mxc_gpio_port *port =3D platform_get_drvdata(pdev); > @@ -647,8 +647,8 @@ static int __maybe_unused mxc_gpio_noirq_resume(struc= t device *dev) > } > > static const struct dev_pm_ops mxc_gpio_dev_pm_ops =3D { > - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mxc_gpio_noirq_suspend, mxc_gpio_no= irq_resume) > - SET_RUNTIME_PM_OPS(mxc_gpio_runtime_suspend, mxc_gpio_runtime_res= ume, NULL) > + NOIRQ_SYSTEM_SLEEP_PM_OPS(mxc_gpio_noirq_suspend, mxc_gpio_noirq_= resume) > + RUNTIME_PM_OPS(mxc_gpio_runtime_suspend, mxc_gpio_runtime_resume,= NULL) > }; > > static int mxc_gpio_syscore_suspend(void) > -- > 2.39.2 > Applied, thanks! Bart