public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: Alexander Shiyan <shc_work@mail.ru>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Chris Ball <chris@printf.net>, Shawn Guo <shawn.guo@linaro.org>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH 2/2] mmc: mxcmmc: Convert to SIMPLE_DEV_PM_OPS
Date: Sat, 22 Feb 2014 16:42:38 +0100	[thread overview]
Message-ID: <1498408.4o9IO9pcnR@wuerfel> (raw)
In-Reply-To: <CAOMZO5DF5DOBMoD7G3237ecPW6YRmEx-KH0pQu4GiSoS+4f5eg@mail.gmail.com>

On Saturday 22 February 2014 12:05:43 Fabio Estevam wrote:
> On Sat, Feb 22, 2014 at 12:02 PM, Alexander Shiyan <shc_work@mail.ru> wrote:
> 
> >> but then you would get a warning saying that "mxcmci_suspend/resume"
> >> are defined by not used" when CONFIG_PM_SLEEP=n
> >
> > Please see the patch first,
> > this warnings is avoided by "__maybe_unused" attributes.
> 
> Ok, I see it now 
> 
> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
> 

Unfortunately, everyone else uses the #ifdef here, and a lot of people
don't understand how to use __maybe_unused for this. IMHO all
drivers should do it the way that Alexander does it here, or
we should change the SIMPLE_DEV_PM_OPS() definition in a way that
doesn't need the #ifdef.

I have in the past tried to come up with a way to handle this more
naturally, but couldn't figure out how to migrate to it. If
SIMPLE_DEV_PM_OPS() defines an unused variable pointing to the
operations, we need neither the #ifdef nor the __maybe_unused
marker, but then it fails to build when there is an #ifdef.

	Arnd

  reply	other threads:[~2014-02-22 15:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-22 14:46 [PATCH 1/2] mmc: mxcmmc: Convert to devm-* API Alexander Shiyan
2014-02-22 14:46 ` [PATCH 2/2] mmc: mxcmmc: Convert to SIMPLE_DEV_PM_OPS Alexander Shiyan
2014-02-22 14:51   ` Fabio Estevam
2014-02-22 14:57     ` Alexander Shiyan
2014-02-22 14:59       ` Fabio Estevam
2014-02-22 15:02         ` Alexander Shiyan
2014-02-22 15:05           ` Fabio Estevam
2014-02-22 15:42             ` Arnd Bergmann [this message]
2014-02-22 15:37 ` [PATCH 1/2] mmc: mxcmmc: Convert to devm-* API Arnd Bergmann
2014-02-22 16:02   ` Alexander Shiyan

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=1498408.4o9IO9pcnR@wuerfel \
    --to=arnd@arndb.de \
    --cc=chris@printf.net \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    --cc=shc_work@mail.ru \
    /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