Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp8048356rwp; Wed, 19 Jul 2023 04:38:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlFg6IwgJwmJmtyu/EaAQVyTGkRnXZSHUoMae4ZM2wYmqrU6fzXpRl9Kz8iqjiT1cCRxx7gi X-Received: by 2002:a17:90a:c78f:b0:261:38ca:3c48 with SMTP id gn15-20020a17090ac78f00b0026138ca3c48mr16287332pjb.11.1689766681300; Wed, 19 Jul 2023 04:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689766681; cv=none; d=google.com; s=arc-20160816; b=nzdZFcZ5FQRMoDkIzh4Vjii8RA0fFQ/hYy/r3dF3h4zHNmzLfTqNB+L0K5N1EEa7uS K5ECECT46HSQFIMFgOrrxPsunNm3kRENYJLQyzcE71ZHbodNLzioIyIv641NCbXom6Uu KCkJFyjiVkQn95I6fdWzkN782PwYDLN+rFLv1DX0AKUiz47cNWhJu4XynN5TgXhKV+ji FSG0KP9Dq5sFxwTzw1O9iszzYgql+2oPmgkRPHAS1X1XW9C006qFLejf+e+1YeIwrso5 Kr9PoFeDID05q0ycdVoIc6A4Tvx05bRSeTKDEOYJ1oIY6BGAUzpIykzRpyuw0q3K6aPt rQIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=mDimigewmW3nMEJvSbjoGyHdnkBM+54sakILIw7rvCw=; fh=tghf+pYqi2tOywpQCXsFBXaDqpB20d29nSLxo8kkxj0=; b=CWmSNVlyWFdu5d+ERAHYgqIM4pUTyKHLbiSWwP9gFD43QemKeHGwFonAcBDZscPLiM mD8ESZKqUBqZ3Xh4EVgSg22Wdvs5CheXQgHMLMJXQme9C9TlAR7LES20ql4Hn/KdkJXr /Y7CPD22D5zFAOgTUxBkNGTNBQV1v493hQRi5EJ6FaEtaEHiy8ntX3sveZRcG1GdmglL yVdamETkUOj6fGMayQCx2oXQ4E70AF65goNZxYcOnMFRXsF5fzjsB3Pp6K3/l3gBZpsi WGNES3R6a7++AVEq2fqWOrGpNfE9K/fZgOsDa6cVTGryQSDhoNgeYRVsSwtzep5+RdA6 VWDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=lxiBjfqd; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Qv3DbYCH; 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 s5-20020a17090b070500b00262fa96d9e6si1233210pjz.142.2023.07.19.04.37.49; Wed, 19 Jul 2023 04:38:01 -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=@arndb.de header.s=fm2 header.b=lxiBjfqd; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Qv3DbYCH; 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 S229766AbjGSL0d (ORCPT + 99 others); Wed, 19 Jul 2023 07:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjGSL0c (ORCPT ); Wed, 19 Jul 2023 07:26:32 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2292CE4D; Wed, 19 Jul 2023 04:26:31 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id EB43C3200929; Wed, 19 Jul 2023 07:26:27 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 19 Jul 2023 07:26:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1689765987; x=1689852387; bh=mD imigewmW3nMEJvSbjoGyHdnkBM+54sakILIw7rvCw=; b=lxiBjfqdegMMLqCzTD rDjT/jzYGMvhreJ8bov2nBM3Q23o+uXqmDkyBqBIlUjBcrAgOfe9FRCY642KGJ+f coXKBZIi1vxWVXDY1ATwy1FR9tHj9olK4tB9COiv74a31gIpS4Yt4xM9tdIyzuIw 9WunAtm7tiYbzrsUBwJjf2BozUqUH3PbguNTsZ7U4oMENeBwXa5/3oDmhljC/CI3 nBTZJTH2GqTiY3H+mW/mhVWKBuHK2k5T9snjQ3bjInyDnfwuC8JtUIFcQ97yIxmd sXQ/wHcNIybTDB6QEXUOkcv6zk73kGeiFkfLU3RSmJYjmn86w/QKeCz8b8etXzUg XLIQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1689765987; x=1689852387; bh=mDimigewmW3nM EJvSbjoGyHdnkBM+54sakILIw7rvCw=; b=Qv3DbYCHxiXOUWbm/ZC3xIqdV99fk gUGmF4B9p/tGncXwnJb0h9XhjrgRluwAdGu3Tm+c/YLKvV+ag3q5M1HMEhAmvmJr Gq/fdU0zzC8rAMXttuRVdcFL3EFfnbvn4f24DZsBCiw5KVWYNTWaSdMaaMmqF4gt O/0+rC06YVRuM1d0iykH3WcYnYtPwhAGHKpjlBMOIEsxBAXS9NrH76pPjVZEPtUA rPvl7R2h/jYsHBhV2x5UfNuj5joP1TpwvLjnLc3Y5fhoCsqPC+vDPntIm7KXinvr L7PKZ+kH1zreKGVRYR9Hm3qXPrCbsGU/7VuNi+dcNkKEzxwfVwff9Sihg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrgeekgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 01EECB60086; Wed, 19 Jul 2023 07:26:26 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-531-gfdfa13a06d-fm-20230703.001-gfdfa13a0 Mime-Version: 1.0 Message-Id: <3e7dbbf3-351c-430e-9bfe-a9e9e9cb895c@app.fastmail.com> In-Reply-To: <319ee5f7-2dbd-430d-8ab1-a7b072ac7a9f@kadam.mountain> References: <20230718193913.3578660-1-arnd@kernel.org> <319ee5f7-2dbd-430d-8ab1-a7b072ac7a9f@kadam.mountain> Date: Wed, 19 Jul 2023 13:26:06 +0200 From: "Arnd Bergmann" To: "Dan Carpenter" , "Arnd Bergmann" Cc: "Linus Walleij" , "Bartosz Golaszewski" , "Andy Shevchenko" , "Shenwei Wang" , "Andy Shevchenko" , "Marek Vasut" , "Marc Zyngier" , "Dan Carpenter" , "open list:GPIO SUBSYSTEM" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: mxc: fix unused function warnings Content-Type: text/plain 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_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, Jul 19, 2023, at 11:44, Dan Carpenter wrote: > On Tue, Jul 18, 2023 at 09:39:08PM +0200, Arnd Bergmann wrote: >> 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 >> --- > > The patch is nice, but I don't understand why __maybe_unused doesn't > work? Adding __maybe_unused to both mxc_gpio_runtime_resume and mxc_gpio_runtime_suspend would avoid the warning, and that is what we used to do in the past before we had the new macros, including for the mxc_gpio_noirq_suspend/mxc_gpio_noirq_resume functions in this driver. Since I'm moving the driver to the new method, it's best to do it for both pairs of PM functions at the same time, so the __maybe_unused annotation becomes redundant. Arnd