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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C17E3C433F5 for ; Thu, 23 Sep 2021 16:25:37 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8D7E6610D1 for ; Thu, 23 Sep 2021 16:25:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D7E6610D1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=o6AJKiXoIXlCHKpTl9khGo7jITn5n6ueXomWcDRDkfk=; b=UyVex5X8z9Agn/ 1OtTKgKXi1P4RZiP4Sy0buFEtKiJafG4HxwmFlknEVFEqKfjlj7Q3xyTxdbRNdOudvecM+nmqy2en tqSjvU2TRn1x3+LxdOhCVIvQ5segh2ZnBa4KMAo7g+ZbbzDyak+s0QiKk7bN6hrDq3FFY9xxoKMRW BMN/KeqHxj6f58Y4TXzWidi1iRNTLOwEZoFy43edyuQFWMxCLlzhoNvqg3+oRNWuVVEHU6wnvAedw nGh8qx7+JuIVC13hWxo9a2GJ7eJAICykXWeh3A4vUU6ieM/gHovcfGI05y1kCDStF/EBEhzOCwW4v pJk2DoUrkmF5r1xOpYMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTRWH-00C8lx-FK; Thu, 23 Sep 2021 16:24:21 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTRWD-00C8lA-W4; Thu, 23 Sep 2021 16:24:19 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 55F02610D1; Thu, 23 Sep 2021 16:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632414257; bh=+1LOJNyFTtX1XI4FCX3CHTATnTuLClCy/KyyBv40muw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jbvwA7dHvwXjS5OlFsVsSKXExfR+9OwhxTGprO1qHjkJj/LHtwdN0ksr+I3BxRrCf aLQXEsd3A/hSnXW/zR52hHXALjxGGq2SZZS6KXfhoiF9Q0ar9JFRbObFLfkpITG2Y7 PEn8wxnxATO+0T15IKX4GBzXw0Cqdm4PuKBoFMmSXijaMkffAfTMvjOUAQiQ0wdF1e N0QQY3Ai+SgKc+gfhwgyS5s6JIDOyjJcVY3lvYSJN9AnWQ50tbHNYwi/SrKQfuFT3g kjcZHk8pCSUmTtZAtRncPmqTSuBRb151WAqdjmprmIIn7ievsKRBQFPEsXImG8wEP8 O2g5+aDOaUncg== Date: Thu, 23 Sep 2021 09:24:12 -0700 From: Nathan Chancellor To: Maxime Ripard Cc: Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , Linus Torvalds , linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Randy Dunlap , Stephen Rothwell Subject: Re: [PATCH] drm/vc4: hdmi: Fix defined but not used warning Message-ID: References: <20210923155728.703312-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210923155728.703312-1-maxime@cerno.tech> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210923_092418_094123_84379F49 X-CRM114-Status: GOOD ( 21.61 ) 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 23, 2021 at 05:57:28PM +0200, Maxime Ripard wrote: > On platforms without CONFIG_PM, SET_RUNTIME_PM_OPS will be a nop and the > functions vc4_hdmi_runtime_resume and vc4_hdmi_runtime_suspend will not > be used anywhere leading to > > warning: 'vc4_hdmi_runtime_suspend' defined but not used [-Wunused-function] > > Since we select CONFIG_PM anyway, vc4_hdmi_runtime_suspend() and > vc4_hdmi_runtime_suspend() will always be used and we can thus always > assign them in struct dev_pm_ops without using the SET_RUNTIME_PM_OPS > macro. > > Reported-by: Randy Dunlap > Signed-off-by: Maxime Ripard Tested-by: Nathan Chancellor # build > --- > > I'm not sure how to merge this one, since this commit has been reverted > in Linus tree, and un-reverted in linux-next. Should we wait a bit until > the reworked version of the original commit has been merged again? > > Maxime > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index 500cdd56b335..5cf3a9aae147 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -2411,9 +2411,8 @@ static const struct of_device_id vc4_hdmi_dt_match[] = { > }; > > static const struct dev_pm_ops vc4_hdmi_pm_ops = { > - SET_RUNTIME_PM_OPS(vc4_hdmi_runtime_suspend, > - vc4_hdmi_runtime_resume, > - NULL) > + .runtime_resume = vc4_hdmi_runtime_resume, > + .runtime_suspend = vc4_hdmi_runtime_suspend, > }; > > struct platform_driver vc4_hdmi_driver = { > -- > 2.31.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel