ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
Subsystems (2)
PATCH 1/1 ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
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]
--- drivers/ata/ahci_imx.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/ata/ahci_imx.c +2 -0
@@ -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);
Signature · 1 line
1.9.0
PATCH 1/1 ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
Quoted 9 lines · Hans de Goede
This fixes the following warnings when
CONFIG_PM_SLEEPis 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 <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Hans de Goede <[email protected]>
Obviously makes sense.
Best regards,
Marek Vasut
?????, 5 ????? 2014, 20:23 +01:00 ?? Marek Vasut <[email protected]>:
Quoted 7 lines · Hans de Goede
Quoted 6 lines
This fixes the following warnings when
CONFIG_PM_SLEEPis 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]
Quoted 7 lines
Quoted 3 lines
Reported-by Bartlomiej Zolnierkiewicz <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Hans de Goede <[email protected]>Obviously makes sense.
Acked-by Marek Vasut <[email protected]>
But a better way is to use the "__maybe_unused" attribute for such cases.
---
Tejun Heo
AppliedPATCH 1/1 ahci_imx: Put #ifdef CONFIG_PM_SLEEP around suspend / resume functions
In reply to Hans de GoedeQuoted 8 lines · Hans de Goede
This fixes the following warnings when
CONFIG_PM_SLEEPis 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 <[email protected]>Cc Bartlomiej Zolnierkiewicz <[email protected]>Signed-off-by Hans de Goede <[email protected]>
Applied to libata/for-3.15.
Thanks.
Signature · 1 line
tejun