From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756028AbdLONKh (ORCPT ); Fri, 15 Dec 2017 08:10:37 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:46517 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755655AbdLONKe (ORCPT ); Fri, 15 Dec 2017 08:10:34 -0500 X-Google-Smtp-Source: ACJfBou2Lp1XC14JB92iKfCMcxJ/MGdUXscORFEUi0v8jb1lKRn6Z76fpO9qFDsDbgg4Qd0Gm/Oj2w== Subject: Re: [PATCH] drm/tegra: mark t186 display hub PM functions __maybe_unused To: Arnd Bergmann , Thierry Reding , David Airlie , Jonathan Hunter Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171215125205.2969211-1-arnd@arndb.de> From: Dmitry Osipenko Message-ID: <0085adc9-a29d-df09-a464-f55d6fd967b9@gmail.com> Date: Fri, 15 Dec 2017 16:10:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171215125205.2969211-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15.12.2017 15:51, Arnd Bergmann wrote: > The newly introduced driver has optional suspend/resume functions, > causing a warning when CONFIG_PM is disabled: > > drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function] > drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function] > > This marks them __maybe_unused to shut up the warnings. > > Fixes: c4755fb9064f ("drm/tegra: Add Tegra186 display hub support") > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/tegra/hub.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c > index cccd44711d68..f4911feda9ff 100644 > --- a/drivers/gpu/drm/tegra/hub.c > +++ b/drivers/gpu/drm/tegra/hub.c > @@ -730,7 +730,7 @@ static int tegra_display_hub_remove(struct platform_device *pdev) > return err; > } > > -static int tegra_display_hub_suspend(struct device *dev) > +static int __maybe_unused tegra_display_hub_suspend(struct device *dev) > { > struct tegra_display_hub *hub = dev_get_drvdata(dev); > int err; > @@ -746,7 +746,7 @@ static int tegra_display_hub_suspend(struct device *dev) > return 0; > } > > -static int tegra_display_hub_resume(struct device *dev) > +static int __maybe_unused tegra_display_hub_resume(struct device *dev) > { > struct tegra_display_hub *hub = dev_get_drvdata(dev); > int err; > Probably would be better to put '#ifdef CONFIG_PM' around these functions for the consistency with the other drm/tegra files.