Skip to contentSkip to conversation

mtd: nand: atmel: mark resume function __maybe_unused

PATCH Applied Arnd Bergmann 2 participants 2 messages May 31, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/mtd/nand/atmel/nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/atmel/nand-controller.c +1 -1
index 6055831c953f..d24e67b95167 100644
@@ -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;
Signature · 1 line
2.9.0
#1 lore raw
Quoted 5 lines · On Wed, 31 May 2017 10:19:26 +0200 Arnd Bergmann <[email protected]> wrote:

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.

Applied to nand/next.

Thanks,

Boris

Quoted 20 lines
Fixes b107007a7114 ("mtd: nand: atmel: Add PM ops")
---
 drivers/mtd/nand/atmel/nand-controller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/atmel/nand-controller.c +1 -1
index 6055831c953f..d24e67b95167 100644
@@ -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;