On Saturday 22 February 2014 12:05:43 Fabio Estevam wrote: > On Sat, Feb 22, 2014 at 12:02 PM, Alexander Shiyan <shc_work@xxxxxxx> 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@xxxxxxxxxxxxx> > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html