mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Arnd Bergmann <arnd@arndb.de>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Jerome Anand <jerome.anand@intel.com>
Subject: Re: [PATCH] ALSA: x86: mark hdmi suspend/resume functions as __maybe_unused
Date: Tue, 7 Feb 2017 23:19:47 +0900	[thread overview]
Message-ID: <14768fe7-9b3a-ed4d-0c15-6ddae07f6cba@sakamocchi.jp> (raw)
In-Reply-To: <20170207133918.1085873-1-arnd@arndb.de>

Hi,

On Feb 7 2016 22:38, Arnd Bergmann wrote:
> The two functions are unused when CONFIG_PM_SLEEP is disabled:
>
> sound/x86/intel_hdmi_audio.c:1633:12: error: 'hdmi_lpe_audio_resume' defined but not used [-Werror=unused-function]
> sound/x86/intel_hdmi_audio.c:1622:12: error: 'hdmi_lpe_audio_suspend' defined but not used [-Werror=unused-function]
>
> Marking them as __maybe_unused avoids the warning without introducing an
> ugly #ifdef.
>
> Fixes: 182cdf23dbf6 ("ALSA: x86: Implement runtime PM")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  sound/x86/intel_hdmi_audio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/x86/intel_hdmi_audio.c b/sound/x86/intel_hdmi_audio.c
> index 8978dc9bf579..0d19a4994bac 100644
> --- a/sound/x86/intel_hdmi_audio.c
> +++ b/sound/x86/intel_hdmi_audio.c
> @@ -1619,7 +1619,7 @@ static int hdmi_lpe_audio_runtime_suspend(struct device *dev)
>  	return 0;
>  }
>
> -static int hdmi_lpe_audio_suspend(struct device *dev)
> +static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
>  {
>  	struct snd_intelhad *ctx = dev_get_drvdata(dev);
>  	int err;
> @@ -1630,7 +1630,7 @@ static int hdmi_lpe_audio_suspend(struct device *dev)
>  	return err;
>  }
>
> -static int hdmi_lpe_audio_resume(struct device *dev)
> +static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
>  {
>  	struct snd_intelhad *ctx = dev_get_drvdata(dev);

In this case, in this subsystem, we can see codes to pre-process the 
function calls to NULL and the function definition is omitted. This is a 
sample:
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/patch_sigmatel.c#n4427

Let us apply the same idea to this module?


Thanks

Takashi Sakamoto

  parent reply	other threads:[~2017-02-07 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 13:38 Arnd Bergmann
2017-02-07 14:17 ` Takashi Iwai
2017-02-07 14:19 ` Takashi Sakamoto [this message]
2017-02-07 15:10   ` Takashi Iwai

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=14768fe7-9b3a-ed4d-0c15-6ddae07f6cba@sakamocchi.jp \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=jerome.anand@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®