From patchwork Thu Nov 24 16:30:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9446069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 55EC36071C for ; Thu, 24 Nov 2016 16:31:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4755227D8D for ; Thu, 24 Nov 2016 16:31:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 387112807B; Thu, 24 Nov 2016 16:31:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C98D627D8D for ; Thu, 24 Nov 2016 16:31:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5C9089DAB; Thu, 24 Nov 2016 16:31:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A22D8926B for ; Thu, 24 Nov 2016 16:31:19 +0000 (UTC) Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfsQF-1cXUFb3CuJ-00pbKk; Thu, 24 Nov 2016 17:31:08 +0100 From: Arnd Bergmann To: Xinliang Liu , Rongrong Zou Subject: [PATCH] drm/hisilicon/hibmc: mark PM functions __maybe_unused Date: Thu, 24 Nov 2016 17:30:26 +0100 Message-Id: <20161124163107.3914495-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:GknbPHqsPlnS6Z09aEyfUzwrqGZxLg9b655B2p34ixva3oUNFab JlBMn3oN4N9DzOJ9dvqSdkWrEZRlkyDnfASl4Q5l3BCwqHqEDAazHRbwodyR3xRifOHHn0t yadY3AdqJT/mTEpvhpK0n7s/2LeSsoqgtdeZwsPx6bh42X/EIqIvLdVU0AMi6kLyFJ+51af gPMLl+1QnXNzEYxJpZrMA== X-UI-Out-Filterresults: notjunk:1; V01:K0:PbRosauhX+g=:Dwlx9cIbLQFB2URlM+2RXn I+Ry39lkUI8qSbrSF/nMndpXsU6sdDPfNmk9LT/SpjTcK/WYBmJ7jWdSZCzZoxErZRBAOEMEy ZMyD20nLGORci/LOCcFIDyK/mS1GTo0dEiK+yIXBaYu5CHpkOTNsQAtV9VZYxMziNmlwxOW1J iaxMMgsLr6pajJd9Cql+rvkZGJi2rLYKGcU+q14iPd3PDwdXGOEEAZDPL4kiQwe3xEWnEnM64 CXktx6w3zIljaGWzG+sN23YS5G8Ogek+iq/dpOku8sU5jKs3zh9461NeX2QLmoG6aIeMoa5ZK MgCKGylViTUw4sIY598oVS7lgEFPSeVeZzLeDnQFlOQepPJSWuDRjApZD2I2Hb9CsUhY46KI4 ZMkV5r0Jy62YePNoCFg6z/nADSiCQjM27qcEexA0M89/g+bGuJ6J+X+tAlEjpOajj6014Xh+8 ySbJ84ND40kv64ObLpKSa7hEEVqEwk3bUsHVhqPBXB8oHJ91OGLLBxX8C4q4r2X+qPiiQaALE tXER3lhRNY4+fqX8K2uXcUrxd039y9wa1hLKgKgBV9qAxiW3NrMu8AbCfyVnQ91/Yg0Z/zAiZ v6yGIwSnzyJ9X7IreahkG1ImgFWV+ED/YB533rLWGLhUqN2gQrY18Udq3AM7JL+PcS4AmxQFf fARHgElWanbEdeghIiKm6RtV8QxWSG/1rdvQcz8hFLC/7eB33S7RKgRxspC79jXpVyZymgLV3 +M+JMlPBbTUhcr86 Cc: Arnd Bergmann , Chen Feng , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_PM_SLEEP is disabled, we get a harmless warning drm/hisilicon/hibmc/hibmc_drm_drv.c:115:12: error: ‘hibmc_pm_resume’ defined but not used [-Werror=unused-function] drm/hisilicon/hibmc/hibmc_drm_drv.c:97:12: error: ‘hibmc_pm_suspend’ defined but not used [-Werror=unused-function] Marking the functions as __maybe_unused avoids the warning without having to add an #ifdef. Fixes: 5e0df3a08f3d ("drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 73ba8b05f1da..fd949df46717 100644 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c @@ -94,7 +94,7 @@ static struct drm_driver hibmc_driver = { .irq_handler = hibmc_drm_interrupt, }; -static int hibmc_pm_suspend(struct device *dev) +static int __maybe_unused hibmc_pm_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev); @@ -112,7 +112,7 @@ static int hibmc_pm_suspend(struct device *dev) return 0; } -static int hibmc_pm_resume(struct device *dev) +static int __maybe_unused hibmc_pm_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); struct drm_device *drm_dev = pci_get_drvdata(pdev);