From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753004AbeC1QDs (ORCPT ); Wed, 28 Mar 2018 12:03:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:57968 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbeC1QDr (ORCPT ); Wed, 28 Mar 2018 12:03:47 -0400 Date: Wed, 28 Mar 2018 18:03:45 +0200 Message-ID: From: Takashi Iwai To: "Lukas Wunner" Cc: "Arnd Bergmann" , , "Vijendar Mukunda" , "Guneshwor Singh" , "Libin Yang" , "Jaroslav Kysela" , "Hans de Goede" , Subject: Re: [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused In-Reply-To: <20180328143150.GA17992@wunner.de> References: <20180328142020.3275989-1-arnd@arndb.de> <20180328143150.GA17992@wunner.de> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Mar 2018 16:31:50 +0200, Lukas Wunner wrote: > > On Wed, Mar 28, 2018 at 04:19:29PM +0200, Arnd Bergmann wrote: > > Two callsites of azx_suspend/azx_resume were removed, leaving these > > functions only called from the optional SET_SYSTEM_SLEEP_PM_OPS() > > and causing a warning without CONFIG_PM_SLEEP: > > > > sound/pci/hda/hda_intel.c:1029:12: error: 'azx_resume' defined but not used [-Werror=unused-function] > > static int azx_resume(struct device *dev) > > ^~~~~~~~~~ > > sound/pci/hda/hda_intel.c:994:12: error: 'azx_suspend' defined but not used [-Werror=unused-function] > > static int azx_suspend(struct device *dev) > > ^~~~~~~~~~~ > > > > Keeping track of the correct #ifdef checks is hard, so this removes > > all the #ifdefs for power management in this file and instead uses > > __maybe_unused annotations that let the compiler do the job right > > by itself. > > Ugh, this isn't as hard as it may seem, just replace > > #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) > > with > > #if defined(CONFIG_PM_SLEEP) > > That way it's just a simple one line change which is less intrusive. > > Care to respin like this? > > Thanks for the report, > > Lukas Also, note that the mentioned vga_switcheroo change is carried via drm-misc tree, so the fix should go to there, too. thanks, Takashi