Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933092AbcCHKeB (ORCPT ); Tue, 8 Mar 2016 05:34:01 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:39805 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933048AbcCHKda (ORCPT ); Tue, 8 Mar 2016 05:33:30 -0500 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [10/14] wireless: cw1200: use __maybe_unused to hide pm functions_ From: Kalle Valo In-Reply-To: <1456934350-1389172-11-git-send-email-arnd@arndb.de> To: Arnd Bergmann Cc: Solomon Peachy , linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <20160308103329.5480960885@smtp.codeaurora.org> Date: Tue, 8 Mar 2016 10:33:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 754 Lines: 21 > The cw1200 uses #ifdef to check for CONFIG_PM, but then > uses SIMPLE_DEV_PM_OPS, which leaves the references out when > CONFIG_PM_SLEEP is not defined, so we get a warning with > PM=y && PM_SLEEP=n: > > drivers/net/wireless/st/cw1200/cw1200_spi.c:450:12: error: 'cw1200_spi_suspend' defined but not used [-Werror=unused-function] > > This removes the incorrect #ifdef and instead uses a __maybe_unused > annotation to let the compiler know it can silently drop > the function definition. > > 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 Thanks, applied to wireless-drivers-next.git. Kalle Valo