* [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
@ 2014-03-05 19:17 Hans de Goede
2014-03-05 19:23 ` Marek Vasut
2014-03-06 19:31 ` Tejun Heo
0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2014-03-05 19:17 UTC (permalink / raw)
To: linux-arm-kernel
This fixes the following warnings when CONFIG_PM_SLEEP is not set:
drivers/ata/ahci_imx.c:284:12: warning: ?imx_ahci_suspend? defined but not used [-Wunused-function]
drivers/ata/ahci_imx.c:299:12: warning: ?imx_ahci_resume? defined but not used [-Wunused-function]
Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/ata/ahci_imx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ata/ahci_imx.c b/drivers/ata/ahci_imx.c
index 3cb5d69..497c7ab 100644
--- a/drivers/ata/ahci_imx.c
+++ b/drivers/ata/ahci_imx.c
@@ -281,6 +281,7 @@ static void ahci_imx_host_stop(struct ata_host *host)
imx_sata_disable(hpriv);
}
+#ifdef CONFIG_PM_SLEEP
static int imx_ahci_suspend(struct device *dev)
{
struct ata_host *host = dev_get_drvdata(dev);
@@ -308,6 +309,7 @@ static int imx_ahci_resume(struct device *dev)
return ahci_platform_resume_host(dev);
}
+#endif
static SIMPLE_DEV_PM_OPS(ahci_imx_pm_ops, imx_ahci_suspend, imx_ahci_resume);
--
1.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
2014-03-05 19:17 [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions Hans de Goede
@ 2014-03-05 19:23 ` Marek Vasut
2014-03-05 19:27 ` Alexander Shiyan
2014-03-06 19:31 ` Tejun Heo
1 sibling, 1 reply; 4+ messages in thread
From: Marek Vasut @ 2014-03-05 19:23 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, March 05, 2014 at 08:17:49 PM, Hans de Goede wrote:
> This fixes the following warnings when CONFIG_PM_SLEEP is not set:
>
> drivers/ata/ahci_imx.c:284:12: warning: ?imx_ahci_suspend? defined but not
> used [-Wunused-function] drivers/ata/ahci_imx.c:299:12: warning:
> ?imx_ahci_resume? defined but not used [-Wunused-function]
>
> Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Obviously makes sense.
Acked-by: Marek Vasut <marex@denx.de>
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
2014-03-05 19:23 ` Marek Vasut
@ 2014-03-05 19:27 ` Alexander Shiyan
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Shiyan @ 2014-03-05 19:27 UTC (permalink / raw)
To: linux-arm-kernel
?????, 5 ????? 2014, 20:23 +01:00 ?? Marek Vasut <marex@denx.de>:
> On Wednesday, March 05, 2014 at 08:17:49 PM, Hans de Goede wrote:
> > This fixes the following warnings when CONFIG_PM_SLEEP is not set:
> >
> > drivers/ata/ahci_imx.c:284:12: warning: ?imx_ahci_suspend? defined but not
> > used [-Wunused-function] drivers/ata/ahci_imx.c:299:12: warning:
> > ?imx_ahci_resume? defined but not used [-Wunused-function]
> >
> > Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Obviously makes sense.
>
> Acked-by: Marek Vasut <marex@denx.de>
But a better way is to use the "__maybe_unused" attribute for such cases.
---
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
2014-03-05 19:17 [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions Hans de Goede
2014-03-05 19:23 ` Marek Vasut
@ 2014-03-06 19:31 ` Tejun Heo
1 sibling, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2014-03-06 19:31 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Mar 05, 2014 at 08:17:49PM +0100, Hans de Goede wrote:
> This fixes the following warnings when CONFIG_PM_SLEEP is not set:
>
> drivers/ata/ahci_imx.c:284:12: warning: ?imx_ahci_suspend? defined but not used [-Wunused-function]
> drivers/ata/ahci_imx.c:299:12: warning: ?imx_ahci_resume? defined but not used [-Wunused-function]
>
> Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied to libata/for-3.15.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-06 19:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 19:17 [PATCH] ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions Hans de Goede
2014-03-05 19:23 ` Marek Vasut
2014-03-05 19:27 ` Alexander Shiyan
2014-03-06 19:31 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).