All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Lukas Wunner <lukas@wunner.de>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Guneshwor Singh <guneshwor.o.singh@intel.com>,
	Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
	Libin Yang <libin.yang@intel.com>,
	alsa-devel@alsa-project.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused
Date: Thu, 29 Mar 2018 00:14:03 +0200	[thread overview]
Message-ID: <CAK8P3a2RSDgxOcAqJK9fJ-zsZJu37nTVn3Wdogj3B655d0yr5Q@mail.gmail.com> (raw)
In-Reply-To: <20180328143150.GA17992@wunner.de>

On Wed, Mar 28, 2018 at 4:31 PM, Lukas Wunner <lukas@wunner.de> 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?

I won't be able to test that properly before the merge window. If you
are sure that works, maybe you can send that patch and just mark
it as 'Reported-by: Arnd Bergmann <arnd@arndb.de>'?

I've mostly stopped trying to figure out what the correct set of #ifdef
for power management functions is, since I get those wrong as much
as everyone else. ;-). The patch I sent has been through a few days
of randconfig testing.

      Arnd

  parent reply	other threads:[~2018-03-28 22:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 14:19 [PATCH] ALSA: hda_intel: mark PM functions as __maybe_unused Arnd Bergmann
2018-03-28 14:19 ` Arnd Bergmann
2018-03-28 14:31 ` Lukas Wunner
2018-03-28 16:03   ` Takashi Iwai
2018-03-28 16:03     ` Takashi Iwai
2018-03-28 22:14   ` Arnd Bergmann [this message]
2018-03-29 11:59     ` Lukas Wunner
2018-03-29 11:59       ` Lukas Wunner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK8P3a2RSDgxOcAqJK9fJ-zsZJu37nTVn3Wdogj3B655d0yr5Q@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=guneshwor.o.singh@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=libin.yang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.