From patchwork Thu Oct 19 09:30:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 116349 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp275634qgn; Thu, 19 Oct 2017 02:31:38 -0700 (PDT) X-Google-Smtp-Source: ABhQp+R/9TQ6/hjN2Y2SWqxL/rvVD56GyheH+MXxOZLVUa7OGKHTzqZDq3T+qrNXl6rpuondaOcQ X-Received: by 10.84.215.9 with SMTP id k9mr1017441pli.284.1508405498685; Thu, 19 Oct 2017 02:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508405498; cv=none; d=google.com; s=arc-20160816; b=vk7TJwGypEvTdOGCgArGjcLp2bmSWKqTQ4PbJLh3UQWrtmCv3ol7bajf1wD+0IfSbd NIoKaEyI54bXj2smvklT6vQoXUeh9C1hrJmqiiFMb+jIKVecVWKw5n83vnhX83JZw8aA n7I9Pek+qWGaAcWRKXjojEBYDP94RDPTr0L+lNZWf/nniPE9aX+ZfwC2iAKAc2iET4A1 vdKfVNfmI8sOJ3d48npNf3QShKSSCi/bTQcCVk8/ajT6nF7eznStJJQn/wj1eJ96m5uk OWVnmhijGh+XRaWeDqqO597w2Kddb9VzKgi+OiJNsv0CXJ8Tyovev7+84mwwAu01p96p wLew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=hnP2+tuGQQIcY4CZMFQqRjC74J930/+hKeUgf+beCCk=; b=fBdo5dx3NSvVhMCOBg+TAiS1a/SPs2LbWqLrjEbWmxxO2ODJSh+jM3g8IZ5VqLczBA s8NLIlDMAf20VKRxuPlm47ywGoga1hOxun8MsYaYrhxuwyDhmRKquQBPW6/4qWijPjix n4hIORTHGwbrTuUGRLjZopGUP7YqGfeeAq4JMgREnVvzcfJoWNqfycuMW4DB1QF3OkrH zPdfH71zmG3GBxTCMv+LE7htWhmbe7/dYHCrRhYTyb40FiCB5AoizHCQ1TCVWBSP77tR gdXiQNDh1P7kYDS7KUuJQ17KKuhoFVhbUoreb9QXiMfys5ngbJDZnwifrumLuE1OXikc rBVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33si3227030plv.670.2017.10.19.02.31.38; Thu, 19 Oct 2017 02:31:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752359AbdJSJbh (ORCPT + 4 others); Thu, 19 Oct 2017 05:31:37 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:54126 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751609AbdJSJbf (ORCPT ); Thu, 19 Oct 2017 05:31:35 -0400 Received: from wuerfel.lan ([46.223.139.202]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfcCc-1dPxng0o82-00pOPL; Thu, 19 Oct 2017 11:30:46 +0200 From: Arnd Bergmann To: Jacob chen , Mauro Carvalho Chehab , Heiko Stuebner Cc: Arnd Bergmann , Hans Verkuil , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] rockchip/rga: annotate PM functions as __maybe_unused Date: Thu, 19 Oct 2017 11:30:34 +0200 Message-Id: <20171019093044.531871-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:n0rzwcJcOsTJTP6gBe8Ctwz06lNUHE7GuNPeKJ6kn6grSxdvbFB XNfFeKV5jZkq94PPca2nh+levPl2p1REhAeFyQtdeLIm0bfD5FTrvU9xbd4a7HzhNjlu6pS BnmBycf0NZ+kXFskVFQza1ya86gX7q0xWRNBS9ZscMQa8B00MBpfwhjpqsoXp7Co2jtnUwk uPOyRyFI6PwF/AdKDR7jQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:t5qnaOWGl/g=:x2rzyIww2c3gmak1sblcOM L1AbNDLzex9NYHJzMM+RstFukAZ/EFGw1Cy9gzLOO8cfmZHP7B/XnWU5cgT2RnsXo8sAklFHE 4pyPGdImq4BL+XcJ+ULwUI5z9opiaVFtHRRQglMpGbDSueDzrdHQfl1ey5QT2aOFiPSAi6l4n Q0a9qZxmKZllIvDudGFMeP8ms8s0UrlBr58nCMTEeDM1jQrARXgxNXFDlD01b9S0NCGRadeNZ hxwpCS1h77g8KBoB14pdZG5g8N/liIKxgSDGHsdQIFYLQFIE1ASREHGaFgjCxW2ZIB2hxcywu Yssxb7BrJKbzojnxDOPrFJoXmzpLAtxODTPvOC6mAsjlsFQZHl8k4kh9ITZ52MbYy0YLNYRWE vXvc4GanvmhyO+I0KY5HCK3bZReRE7DOG4JMz4TvDDYVIK6+6X2spbIx+kvwnTd8FrP1uQRZ+ 212mbvR1zokkUtE+k0/Z7/O/ornIJ/yncphA1p9md3klW/7+U30Uxj+Eoi3mM7sCjROI7duGc fTYPhDSc257jh/Hsy0+4jDF2fu3WpAgYpm0LxmpsdgAzH9X/Vjofds43W8l6skf8n9qsJnWCp 6iM8sNZjxYE9gGKEnTnPGEF7ZOvQunxIkyrtrDlgx2e8OYLSsu2gHBqlYnkH1nCIujcP3hrm2 B4TDvX/DuKKR3z7KUIyoIsbAxmZ7JLKUZrSmeXy4nJ1CmT5UxHjJYEn4Zpg/ldxq1d1+U0Ass cJixPY2xjJ6pE3meQe5yd+OxzGgsyluLJ+wLyg== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The newly added driver has incorrect #ifdef annotations on its PM functions, leading to a harmless compile-time warning when CONFIG_PM is disabled: drivers/media/platform/rockchip/rga/rga.c:760:13: error: 'rga_disable_clocks' defined but not used [-Werror=unused-function] static void rga_disable_clocks(struct rockchip_rga *rga) ^~~~~~~~~~~~~~~~~~ drivers/media/platform/rockchip/rga/rga.c:728:12: error: 'rga_enable_clocks' defined but not used [-Werror=unused-function] This removes the #ifdef and marks the functions as __maybe_unused, so gcc can silently drop all the unused code. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Arnd Bergmann --- drivers/media/platform/rockchip/rga/rga.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.9.0 diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c index e7d1b34baf1c..89296de9cf4a 100644 --- a/drivers/media/platform/rockchip/rga/rga.c +++ b/drivers/media/platform/rockchip/rga/rga.c @@ -960,8 +960,7 @@ static int rga_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM -static int rga_runtime_suspend(struct device *dev) +static int __maybe_unused rga_runtime_suspend(struct device *dev) { struct rockchip_rga *rga = dev_get_drvdata(dev); @@ -970,13 +969,12 @@ static int rga_runtime_suspend(struct device *dev) return 0; } -static int rga_runtime_resume(struct device *dev) +static int __maybe_unused rga_runtime_resume(struct device *dev) { struct rockchip_rga *rga = dev_get_drvdata(dev); return rga_enable_clocks(rga); } -#endif static const struct dev_pm_ops rga_pm = { SET_RUNTIME_PM_OPS(rga_runtime_suspend,