public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Dong Aisheng <dongas86@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Dong Aisheng <aisheng.dong@nxp.com>,
	Haibo Chen <haibo.chen@freescale.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings
Date: Tue, 26 Jul 2016 16:28:28 +0200	[thread overview]
Message-ID: <5892795.2gjnivGOlz@wuerfel> (raw)
In-Reply-To: <CAA+hA=RPKfRgDc-SesHR8pBFwo0fsbYT=sY=QYyqiAV7U=k_hA@mail.gmail.com>

On Tuesday, July 26, 2016 9:41:50 PM CEST Dong Aisheng wrote:
> 
> On Tue, Jul 26, 2016 at 8:32 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > The driver has just gained a slightly incorrect pm-sleep implementation that causes
> > warnings when CONFIG_PM is set but CONFIG_PM_SLEEP is not:
> >
> > drivers/mmc/host/sdhci-esdhc-imx.c:1302:12: error: 'sdhci_esdhc_resume' defined but not used [-Werror=unused-function]
> >  static int sdhci_esdhc_resume(struct device *dev)
> >             ^~~~~~~~~~~~~~~~~~
> > drivers/mmc/host/sdhci-esdhc-imx.c:1297:12: error: 'sdhci_esdhc_suspend' defined but not used [-Werror=unused-function]
> >  static int sdhci_esdhc_suspend(struct device *dev)
> >
> > This replaces the incorrect #ifdef with a __maybe_unused annotation that does
> > the right thing in all configurations and is more readable.
> >
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: b70d0b3b5b29 ("mmc: sdhci-esdhc-imx: add esdhc specific suspend resume callback")
> 
> Thanks for the fix.
> Looks like the default kernel Makefile does not enable
> -Werror=unused-function wanrings,
> so did not expose it before.

They are enabled by default as warnings, not errors. My test build setup
uses -Werror to turn all warnings into errors so I can catch them
more easily as failed builds.

> Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
> 

Thanks,

	Arnd

  reply	other threads:[~2016-07-26 14:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-26 12:32 [PATCH] mmc: sdhci-esdhc-imx: avoid unused function warnings Arnd Bergmann
2016-07-26 13:41 ` Dong Aisheng
2016-07-26 14:28   ` Arnd Bergmann [this message]
2016-07-26 20:18 ` Ulf Hansson
2016-07-26 20:56   ` Arnd Bergmann
2016-07-26 22:48     ` Ulf Hansson
2016-07-27  7:30       ` Arnd Bergmann
2016-07-27  7:10 ` Arnd Bergmann

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=5892795.2gjnivGOlz@wuerfel \
    --to=arnd@arndb.de \
    --cc=adrian.hunter@intel.com \
    --cc=aisheng.dong@nxp.com \
    --cc=dongas86@gmail.com \
    --cc=haibo.chen@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.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