From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: wlcore: fix unused function warning Date: Thu, 14 Dec 2017 12:45:16 +0000 (UTC) Message-ID: <20171214124516.7D190600EC@smtp.codeaurora.org> References: <20171211114718.3637010-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: Arnd Bergmann , "Reizer, Eyal" , Johannes Berg , Iain Hunter , Arend Van Spriel , Kees Cook , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: Arnd Bergmann Return-path: In-Reply-To: <20171211114718.3637010-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Arnd Bergmann wrote: > The newly added wlcore_fw_sleep function is called conditionally, > which causes a warning without CONFIG_PM: > > drivers/net/wireless/ti/wlcore/main.c:981:12: error: 'wlcore_fw_sleep' defined but not used [-Werror=unused-function] > > Instead of trying to keep track of what should be in the #ifdef and what > should not, it's easier to mark the top-level suspend/resume functions > as __maybe_unused so the compiler can silently drop all the unused code. > > Fixes: 37bf241b8e7b ("wlcore: allow elp during wowlan suspend") > Signed-off-by: Arnd Bergmann Patch applied to wireless-drivers-next.git, thanks. 7de241f3b705 wlcore: fix unused function warning -- https://patchwork.kernel.org/patch/10104839/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches