drm/hisilicon/hibmc: mark PM functions __maybe_unused
Subsystems (3)
PATCH 1/1 drm/hisilicon/hibmc: mark PM functions __maybe_unused
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.
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +2 -2
@@ -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);
Signature · 1 line
2.9.0
Daniel Vetter
AppliedQuoted 10 lines · Arnd Bergmann
When
CONFIG_PM_SLEEPis 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_unusedavoids the warning without having to add an #ifdef.Fixes 5e0df3a08f3d ("drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver")Signed-off-by Arnd Bergmann <[email protected]>
Applied to drm-misc, thx.
-Daniel
Quoted 33 lines
--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c +2
-2@@ -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);Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel