[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56E15DAD.3000104@linux.intel.com>
Date: Thu, 10 Mar 2016 13:42:37 +0200
From: Mathias Nyman <mathias.nyman@...ux.intel.com>
To: Matthias Brugger <matthias.bgg@...il.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: linux-arm-kernel@...ts.infradead.org,
Felipe Balbi <balbi@...nel.org>,
Alan Stern <stern@...land.harvard.edu>,
linux-usb@...r.kernel.org, Mathias Nyman <mathias.nyman@...el.com>,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] usb: xhci-mtk: use __maybe_unused to hide pm functions
On 04.03.2016 18:33, Matthias Brugger wrote:
>
>
> On 02/03/16 16:24, Arnd Bergmann wrote:
>> The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to
>> conditionally set the correct suspend/resume options, and
>> also puts both the dev_pm_ops and the functions inside of
>> an #ifdef testing for CONFIG_PM_SLEEP, but those functions
>> then call other code that becomes unused:
>>
>> drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function]
>> drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function]
>>
>> This replaces the #ifdef with __maybe_unused annotations so the
>> compiler knows it can silently drop them instead of warning.
>>
>> For the DEV_PM_OPS definition, we can use an IS_ENABLED() check
>> to avoid defining the structure when CONFIG_PM is not set without
>> the #ifdef.
>>
>> Signed-off-by: Arnd Bergmann <arnd@...db.de>
>> ---
>
> Reviewed-by: Matthias Brugger <matthias.bgg@...il.com>
>
Acked-by: Mathias Nyman <mathias.nyman@...ux.intel.com>
Powered by blists - more mailing lists