Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752533AbcKYGpQ (ORCPT ); Fri, 25 Nov 2016 01:45:16 -0500 Received: from mail-wj0-f193.google.com ([209.85.210.193]:36012 "EHLO mail-wj0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751932AbcKYGpH (ORCPT ); Fri, 25 Nov 2016 01:45:07 -0500 Date: Fri, 25 Nov 2016 07:44:22 +0100 From: Daniel Vetter To: Arnd Bergmann Cc: Xinliang Liu , Rongrong Zou , Chen Feng , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/hisilicon/hibmc: mark PM functions __maybe_unused Message-ID: <20161125064422.zrpzg76reyyrwaln@phenom.ffwll.local> Mail-Followup-To: Arnd Bergmann , Xinliang Liu , Rongrong Zou , Chen Feng , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20161124163107.3914495-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20161124163107.3914495-1-arnd@arndb.de> X-Operating-System: Linux phenom 4.8.0-1-amd64 User-Agent: NeoMutt/20161104 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1940 Lines: 53 On Thu, Nov 24, 2016 at 05:30:26PM +0100, Arnd Bergmann wrote: > 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 Applied to drm-misc, thx. -Daniel > --- > 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); > -- > 2.9.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch