linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Maximilian Luz <luzmaximilian@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Platform Driver <platform-driver-x86@vger.kernel.org>
Subject: Re: [PATCH -next] platform: surface: fix non-PM_SLEEP build warnings
Date: Sat, 12 Dec 2020 09:05:01 -0800	[thread overview]
Message-ID: <ec8e703f-e1ea-1253-edc9-311f0ee3e8fd@infradead.org> (raw)
In-Reply-To: <CAHp75Vcckb5NA=tc5s5p_qzYE2qhJOT0vhCtfKhT_eqZe+PgXw@mail.gmail.com>

On 12/12/20 5:24 AM, Andy Shevchenko wrote:
> On Fri, Dec 11, 2020 at 9:20 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>>
>> Fix build warnings when CONFIG_PM_SLEEP is not enabled and these
>> functions are not used:
>>
>> ../drivers/platform/surface/surface_gpe.c:189:12: warning: ‘surface_gpe_resume’ defined but not used [-Wunused-function]
>>  static int surface_gpe_resume(struct device *dev)
>>             ^~~~~~~~~~~~~~~~~~
>> ../drivers/platform/surface/surface_gpe.c:184:12: warning: ‘surface_gpe_suspend’ defined but not used [-Wunused-function]
>>  static int surface_gpe_suspend(struct device *dev)
>>             ^~~~~~~~~~~~~~~~~~~
> 
> ...
> 
>> +#ifdef CONFIG_PM_SLEEP
>>  static int surface_gpe_suspend(struct device *dev)
> 
> Perhaps __maybe_unused ?
> 

Yes, I am aware of that option.
I don't know why it would be preferred though.

-- 
~Randy


  reply	other threads:[~2020-12-12 17:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 19:03 [PATCH -next] platform: surface: fix non-PM_SLEEP build warnings Randy Dunlap
2020-12-11 20:23 ` Maximilian Luz
2020-12-11 20:41   ` Randy Dunlap
2020-12-11 21:00     ` Maximilian Luz
2020-12-12 13:24 ` Andy Shevchenko
2020-12-12 17:05   ` Randy Dunlap [this message]
2020-12-12 19:07     ` Andy Shevchenko
2020-12-14  0:53       ` Randy Dunlap
2020-12-14 11:19         ` Andy Shevchenko
2020-12-14 23:49           ` Randy Dunlap
2020-12-16 10:49             ` Andy Shevchenko

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=ec8e703f-e1ea-1253-edc9-311f0ee3e8fd@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luzmaximilian@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).