From patchwork Thu Sep 23 15:57:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12513197 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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 0FA19C433EF for ; Thu, 23 Sep 2021 15:59:51 +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 CB01460F0F for ; Thu, 23 Sep 2021 15:59:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CB01460F0F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech 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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ibtykc/fE1e3ZflfGUoIZyhYStY3BcvLlZOJAxtfK74=; b=FNLcFLx7KZBUc2 IXXauTTZffvZvbq6fnCfLLEYq8vvob1X4UkLl8DGg5HJgL3ues1AsQki2focQMJMQPot61YFGz/XE WqPmLo+o5eItHAVIQZAOBQ5+WX8E1tyUSHjX2OJLrmrLBnGZLUxy8kB9dJNGUc2QZ/t0oYn+54R8b TVBWeW0pS7rMwzWgJr+p7tU3e0lR2aSZj0s7zqlzYjqFFrON01RwNscFmxgZAk0F2EdmdP+dgTv0Q 4GE7r5v5vVy2/MaDJ9hALtLn6q/t6kGAlH11xrgLi4VQlCyQh7sO+zpeitlqdR3NJuQRgIxOhn/Bf MQVeCnFQ19UMBZ65eeQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTR6U-00C5zD-92; Thu, 23 Sep 2021 15:57:42 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mTR6Q-00C5yR-9d; Thu, 23 Sep 2021 15:57:39 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id A9A82580450; Thu, 23 Sep 2021 11:57:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 23 Sep 2021 11:57:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=dABIVCyZFSAt8XeROQeUGBqhYV atCI6zYspzjgCkrCc=; b=0KArBVSxEPfnLrIMeU4vZ+tNFDvJn6stkFVZCoa70J gGXghUB7F1ogoGTfZBGtBvkGQbYlBYJJ+oIT1ZaN92f30BlKdeprbaGRHOf6OQOg kjzF/srzNnEtMrDa1C9G/VAGeCMBPB57ltIfFQsEd8861loMwqpcBtESam1/7ogn SDcQp6/59Fj7+SzOJvZiIv7XuV5Pi2/bzWy5+OP3amsxdjBzpmrO0Af9hUNJz1Dg O02w6uMuwrMbFPBjzEMvRFnpK6Wsy5FD/WF94yTGlZnRrCgABRwrSRxQvLB7x8A9 bLaVyzRE4OgJfDwaPOFUOn48yJrkelswLSKdaf3shAuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=dABIVCyZFSAt8XeRO QeUGBqhYVatCI6zYspzjgCkrCc=; b=cyqVGfeeQyMRrrn8Vq/3KceCk6Dygs6xd 7cv8i37+Goi/K+TCYYtnlTiW88voD11NRT7ygdcuVrhw0mXVvphYa7+inqPmZASs X8Cet/FU3OwHR42w1ueHS+yvocecURWRJxQfGuFmjNM0G4ig1bUCpWADTECnspkC rqnMfumiPD+JgVCaMX8iMzdFoli1YSPGfc7mOuwHlE0KklurYofBS7f7H6uSIwAq JT+kyKm93BDO2bgDKJ5rCayqsyKVmIvWeeg15Fsl/3kzB1wMOVxckdylc2G3CIwq /umCQZhB3PLxsKb1j6EfPizRdpqQUAL5D7Hr1k4sXdXJPIjaZScuw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudeiledgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhmvgcu tfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrthhtvg hrnhepjeffheduvddvvdelhfegleelfffgieejvdehgfeijedtieeuteejteefueekjeeg necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgrgi himhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 23 Sep 2021 11:57:32 -0400 (EDT) From: Maxime Ripard To: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Cc: Linus Torvalds , linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Nicolas Saenz Julienne , linux-arm-kernel@lists.infradead.org, Nathan Chancellor , Randy Dunlap , Stephen Rothwell Subject: [PATCH] drm/vc4: hdmi: Fix defined but not used warning Date: Thu, 23 Sep 2021 17:57:28 +0200 Message-Id: <20210923155728.703312-1-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210923_085738_622330_A81AD11E X-CRM114-Status: GOOD ( 12.15 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 = {