[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5htvt0kx0e.wl-tiwai@suse.de>
Date: Wed, 28 Mar 2018 18:03:45 +0200
From: Takashi Iwai <tiwai@...e.de>
To: "Lukas Wunner" <lukas@...ner.de>
Cc: "Arnd Bergmann" <arnd@...db.de>, <alsa-devel@...a-project.org>,
"Vijendar Mukunda" <Vijendar.Mukunda@....com>,
"Guneshwor Singh" <guneshwor.o.singh@...el.com>,
"Libin Yang" <libin.yang@...el.com>,
"Jaroslav Kysela" <perex@...ex.cz>,
"Hans de Goede" <hdegoede@...hat.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused
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
Powered by blists - more mailing lists