Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450957

Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings

From Ulf Hansson <ulf.hansson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings
Date 2016-07-27 00:50 +0200
Message-ID <rZjkJ-80Z-13@gated-at.bofh.it> (permalink)
References <rZ9Or-1Wx-39@gated-at.bofh.it> <rZgZB-6D5-33@gated-at.bofh.it> <rZhCi-6Qe-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 26 July 2016 at 22:56, Arnd Bergmann <arnd@arndb.de> wrote:
> On Tuesday, July 26, 2016 10:18:53 PM CEST Ulf Hansson wrote:
>> > diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
>> > index 2bb326bbc34a..593e34053c4b 100644
>> > --- a/drivers/mmc/host/sdhci-esdhc-imx.c
>> > +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
>> > @@ -1293,13 +1293,12 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
>> >         return 0;
>> >  }
>> >
>> > -#ifdef CONFIG_PM
>> > -static int sdhci_esdhc_suspend(struct device *dev)
>> > +static int __maybe_unused sdhci_esdhc_suspend(struct device *dev)
>>
>> Instead of using __maybe_unused, I prefer to change above "#ifdef
>> CONFIG_PMf" to "#ifdef CONFIG_PM_SLEEP".
>> I do realize that the runtime PM callbacks still requires #ifdef
>> CONFIG_PM, so yes that's requires an extra "ifdef".
>>
>> Sure, it's more a matter of taste (and micro optimizations).
>
> I was hoping that we could eventually do a mass-conversion to
> __maybe_unused, as everybody seems to get the #ifdef wrong.
>
> Any specific reason for your preference?

Only that this is how I get used to do it - and that it becomes a bit
more clear what is needed to support the various PM configurations.

If you still insist on the "maybe_unused" option, that's okay as well.

Kind regards
Uffe

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Arnd Bergmann <arnd@arndb.de> - 2016-07-26 14:40 +0200
  Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Dong Aisheng <dongas86@gmail.com> - 2016-07-26 15:50 +0200
    Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Arnd Bergmann <arnd@arndb.de> - 2016-07-26 16:30 +0200
  Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Ulf Hansson <ulf.hansson@linaro.org> - 2016-07-26 22:20 +0200
    Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Arnd Bergmann <arnd@arndb.de> - 2016-07-26 23:00 +0200
      Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Ulf Hansson <ulf.hansson@linaro.org> - 2016-07-27 00:50 +0200
        Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Arnd Bergmann <arnd@arndb.de> - 2016-07-27 09:40 +0200
  Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Arnd Bergmann <arnd@arndb.de> - 2016-07-27 09:20 +0200

csiph-web