mtd: nand: atmel: mark resume function __maybe_unused

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu Jul 13 10:59:16 PDT 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=05b6c2313e91ac65915bde5e55bc6f194bfe22f3
Commit:     05b6c2313e91ac65915bde5e55bc6f194bfe22f3
Parent:     79e0348c4e24fd1affdcf055e0269755580e0fcc
Author:     Arnd Bergmann <arnd at arndb.de>
AuthorDate: Wed May 31 10:19:26 2017 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Thu Jun 1 10:09:35 2017 +0200

    mtd: nand: atmel: mark resume function __maybe_unused
    
    The newly added suspend/resume support causes a harmless warning:
    
    drivers/mtd/nand/atmel/nand-controller.c:2513:12: error: 'atmel_nand_controller_resume' defined but not used [-Werror=unused-function]
    
    This shuts up the warning with a __maybe_unused annotation.
    
    Fixes: b107007a7114 ("mtd: nand: atmel: Add PM ops")
    Signed-off-by: Arnd Bergmann <arnd at arndb.de>
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
 drivers/mtd/nand/atmel/nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
index 6055831..d24e67b 100644
--- a/drivers/mtd/nand/atmel/nand-controller.c
+++ b/drivers/mtd/nand/atmel/nand-controller.c
@@ -2510,7 +2510,7 @@ static int atmel_nand_controller_remove(struct platform_device *pdev)
 	return nc->caps->ops->remove(nc);
 }
 
-static int atmel_nand_controller_resume(struct device *dev)
+static __maybe_unused int atmel_nand_controller_resume(struct device *dev)
 {
 	struct atmel_nand_controller *nc = dev_get_drvdata(dev);
 	struct atmel_nand *nand;



More information about the linux-mtd-cvs mailing list