Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7322828rwp; Tue, 18 Jul 2023 13:32:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlFi1HKIOoxGZOur9PVnbFGp9eHkDwQIgxiZF9Jid05peISVqCSxSzr7/h6csHmty5y6zTVA X-Received: by 2002:a05:6a20:8f14:b0:100:b92b:e8be with SMTP id b20-20020a056a208f1400b00100b92be8bemr533361pzk.2.1689712347654; Tue, 18 Jul 2023 13:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689712347; cv=none; d=google.com; s=arc-20160816; b=SBAOm5FlyCOuS23v0OSuICizv/vjnsR+bb106Pj13JgvqLIDtTWPbJ73cOv6XPlVQs cQwyMpEaWpKDuYYvU1V96/yNsTjR7Oz9IYcZ5A21IYIOVRCNgkCLRPFkd9qk3G/nzLaN VdBsIxxmwxc5D/FYRauAWQ5FhupNLOtEmIHDCSRaaP6eTyo5p6hAPSvKVZq8sB3t9zJA gOkKkGrz7BAlPbyFzvmXiIx5UN7cPc9eDokATAhZ1TK93c2Jvqc/wk9Wwk8Wf+ViylLZ KS6BK4I1sNL/YkU82SsVxDvY6fng7x1N7ExXYJH6UKTDXXI48skMSdQHYUMIznJJah/w eACA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=GpLYx7yr0iM+Lgomxd2ftT9uvocjy26TVs/UZT33pME=; fh=gdQ+RPJrWzzSMuW0iby/EqemfvTOoZVpmGlD9TuM+0U=; b=ziRJY0X2FwyysP6UXMPpgcKs4zNUF/Wd7s0qVPnlmVtDM/U773QH++iwxRicwpN97i G39i0SHN4KSZrcYjlh7pxjcnZOuicDB1UNaG1ieh4QKE3iwGZxwSMOvlB5reFQ93L+SD Ivm+nj9WmRv6dNKpda7Tbue0Q1RVtn8iQjbLhLvPo0wNrxVBdaFlmRu24JU/aAmORvzB LQSRdkr5Z0oHJirF7KrFq0tOxp/R6xvRW4+aQNuKMM94s/IFUQwXd1KVw3tYU/ELAD8O PSrFgWBpIT9y04ZNE5/KOVW8ZlrkjgdtOgnq8KyUWJTcbUUfuUv67PdnQlMd/hbeNZB0 bbxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=o4wM9mZ0; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a638842000000b0055fc5e67d56si1954008pgd.7.2023.07.18.13.32.14; Tue, 18 Jul 2023 13:32:27 -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=@kernel.org header.s=k20201202 header.b=o4wM9mZ0; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjGRTjW (ORCPT + 99 others); Tue, 18 Jul 2023 15:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229678AbjGRTjV (ORCPT ); Tue, 18 Jul 2023 15:39:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 611EB198D; Tue, 18 Jul 2023 12:39:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EF4E060B67; Tue, 18 Jul 2023 19:39:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4A0CC433C8; Tue, 18 Jul 2023 19:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689709159; bh=edH1Zr2qH/fjaThXqfpUXzX8pWVRCsemGBHQNSlSqok=; h=From:To:Cc:Subject:Date:From; b=o4wM9mZ0npgKSQDLKS2fgstEeuMrgo+3fH5Tzy0PRVO9VigkaLoYEADgh1spnvD6W jcTl86agH4tnuwVnj5WtJfPinX8GiFwlwFxVS6CzNie64Lu489E5CLIuSPfe951XHG BRQ9NVcb0joSQlElAqd0fQ//yM8xWZ8PGTkf5njDmln25oYfV68KnbrjBop3kQ8Yun TazcmaorIkqSoIdVCjWaMa4UHxHDPqmOqpzKzBtk7aFZPa8fTq2wOo5RU23yAvo8fv NR1WHFiu7TZuHS3FTZSK3vDiF/LrJBBKu/cbcd+YgtnMGSseQqLzOqYDlpKLiGHd3l 8JMddIjWwdJaw== From: Arnd Bergmann To: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Shenwei Wang Cc: Arnd Bergmann , Andy Shevchenko , Marek Vasut , Marc Zyngier , Dan Carpenter , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] gpio: mxc: fix unused function warnings Date: Tue, 18 Jul 2023 21:39:08 +0200 Message-Id: <20230718193913.3578660-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 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=unused-function] drivers/gpio/gpio-mxc.c:602:12: error: 'mxc_gpio_runtime_suspend' defined but not used [-Werror=unused-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 = to_platform_device(dev); struct mxc_gpio_port *port = platform_get_drvdata(pdev); @@ -634,7 +634,7 @@ static int __maybe_unused mxc_gpio_noirq_suspend(struct 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 = to_platform_device(dev); struct mxc_gpio_port *port = platform_get_drvdata(pdev); @@ -647,8 +647,8 @@ static int __maybe_unused mxc_gpio_noirq_resume(struct device *dev) } static const struct dev_pm_ops mxc_gpio_dev_pm_ops = { - SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(mxc_gpio_noirq_suspend, mxc_gpio_noirq_resume) - SET_RUNTIME_PM_OPS(mxc_gpio_runtime_suspend, mxc_gpio_runtime_resume, 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