File 0308-drm-hisilicon-hibmc-mark-PM-functions-__maybe_unused.patch of Package drm.openSUSE_Leap_42.3_Update

From a046d112109b8412aba524e8154ac6b3517498b2 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 24 Nov 2016 17:30:26 +0100
Subject: [PATCH 8/8] drm/hisilicon/hibmc: mark PM functions __maybe_unused
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Git-commit: b61abd49c5dd07d3b97b638128982c3feef99a93
Patch-mainline: v4.10-rc1
References: fate#322061

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 <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161124163107.3914495-1-arnd@arndb.de
Signed-off-by: Patrik Jakobsson <pjakobsson@suse.de>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 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 devic
 	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);