From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751465AbdAVHji (ORCPT ); Sun, 22 Jan 2017 02:39:38 -0500 Received: from lucky1.263xmail.com ([211.157.147.130]:37735 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750978AbdAVHjH (ORCPT ); Sun, 22 Jan 2017 02:39:07 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] PCI: rockchip: mark PM functions as __maybe_unused To: Arnd Bergmann References: <20170120162450.3690225-1-arnd@arndb.de> Cc: Bjorn Helgaas , shawn.lin@rock-chips.com, Wenrui Li , Heiko Stuebner , Brian Norris , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Shawn Lin Message-ID: <41135715-6f07-9c85-0b78-c66a37607b92@rock-chips.com> Date: Sun, 22 Jan 2017 15:38:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170120162450.3690225-1-arnd@arndb.de> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, On 2017/1/21 0:24, Arnd Bergmann wrote: > When CONFIG_PM_SLEEP is disabled, we get harmless build warnings: > > host/pcie-rockchip.c:1267:12: error: 'rockchip_pcie_resume_noirq' defined but not used [-Werror=unused-function] > host/pcie-rockchip.c:1240:12: error: 'rockchip_pcie_suspend_noirq' defined but not used [-Werror=unused-function] > > Marking both functions as __maybe_unused avoids the warning without > the need for #ifdef around them. Sorry for introducing this warning, and thanks for fixing it. Acked-by: Shawn Lin > > Fixes: 013dd3d5e183 ("PCI: rockchip: Add system PM support") > Signed-off-by: Arnd Bergmann > --- > drivers/pci/host/pcie-rockchip.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c > index 0d6e8ee5b017..b975116d2b03 100644 > --- a/drivers/pci/host/pcie-rockchip.c > +++ b/drivers/pci/host/pcie-rockchip.c > @@ -1237,7 +1237,7 @@ static int rockchip_pcie_wait_l2(struct rockchip_pcie *rockchip) > return 0; > } > > -static int rockchip_pcie_suspend_noirq(struct device *dev) > +static int __maybe_unused rockchip_pcie_suspend_noirq(struct device *dev) > { > struct rockchip_pcie *rockchip = dev_get_drvdata(dev); > int ret; > @@ -1264,7 +1264,7 @@ static int rockchip_pcie_suspend_noirq(struct device *dev) > return ret; > } > > -static int rockchip_pcie_resume_noirq(struct device *dev) > +static int __maybe_unused rockchip_pcie_resume_noirq(struct device *dev) > { > struct rockchip_pcie *rockchip = dev_get_drvdata(dev); > int err; > -- Best Regards Shawn Lin