public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maximilian Luz <luzmaximilian@gmail.com>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Hans de Goede <hdegoede@redhat.com>, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH -next] platform: surface: fix non-PM_SLEEP build warnings
Date: Fri, 11 Dec 2020 22:00:49 +0100	[thread overview]
Message-ID: <4ed22944-c10b-221f-f7eb-52ca3e7f2d18@gmail.com> (raw)
In-Reply-To: <c9e708d4-f4c5-01e2-d003-7f5d92a533e9@infradead.org>

On 12/11/20 9:41 PM, Randy Dunlap wrote:
> On 12/11/20 12:23 PM, Maximilian Luz wrote:
>> On 12/11/20 8:03 PM, Randy Dunlap 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)
>>>               ^~~~~~~~~~~~~~~~~~~
>>>
>>> Fixes: 274335f1c557 ("platform/surface: Add Driver to set up lid GPEs on MS Surface device")
>>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>>> Cc: Maximilian Luz <luzmaximilian@gmail.com>
>>> Cc: Hans de Goede <hdegoede@redhat.com>
>>> Cc: platform-driver-x86@vger.kernel.org
>>> ---
>>>    drivers/platform/surface/surface_gpe.c |    2 ++
>>>    1 file changed, 2 insertions(+)
>>>
>>> --- linux-next-20201210.orig/drivers/platform/surface/surface_gpe.c
>>> +++ linux-next-20201210/drivers/platform/surface/surface_gpe.c
>>> @@ -181,6 +181,7 @@ static int surface_lid_enable_wakeup(str
>>>        return 0;
>>>    }
>>>    +#ifdef CONFIG_PM_SLEEP
>>>    static int surface_gpe_suspend(struct device *dev)
>>>    {
>>>        return surface_lid_enable_wakeup(dev, true);
>>> @@ -190,6 +191,7 @@ static int surface_gpe_resume(struct dev
>>>    {
>>>        return surface_lid_enable_wakeup(dev, false);
>>>    }
>>> +#endif
>>>      static SIMPLE_DEV_PM_OPS(surface_gpe_pm, surface_gpe_suspend, surface_gpe_resume);
>>>   
>>
>> Right, thanks.
>>
>> I assume this covers all instances of this warning in platform/surface?
>> Otherwise, a "platform: surface: gpe: ..." subject would make more sense.
> 
> It should cover all of surface/. It was an allmodconfig and then I disabled
> CONFIG_PM and CONFIG_PM_SLEEP etc.

Perfect, thanks!

> As for prefixes, how many levels do we want to use?
> (that's mostly rhetorical, although I would read answers :)

Looking at platform/x86 and past commit messages, I'd prefer something
like

     platform/surface: <component>: <message>

This would be similar to the platform/x86 style. So two or three,
depending on how you count "platform/surface". I agree that this
probably tends to get a bit long, so I propose we drop the surface_
prefix on the component part to help with that. So, for example,
"surface_gpe" will become "gpe".

> 
>> As for the rest:
>>
>> Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
> 
> thanks.
> 

Regards,
Max

  reply	other threads:[~2020-12-11 21:50 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 [this message]
2020-12-12 13:24 ` Andy Shevchenko
2020-12-12 17:05   ` Randy Dunlap
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=4ed22944-c10b-221f-f7eb-52ca3e7f2d18@gmail.com \
    --to=luzmaximilian@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rdunlap@infradead.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