[U-Boot] [PATCH V2 2/5] dm9000: mark dump_regs() function as unused

Andrew Ruder andrew.ruder at elecsyscorp.com
Wed Aug 12 19:24:03 CEST 2015


dump_regs() is a handy function to keep around for bringing up a new
dm9000-based board, but defining CONFIG_DM9000_DEBUG only adds the
function - nowhere currently uses it.  Rather than remove a potentially
useful function, let's just tell gcc to not emit a warning when it is
unused.

Signed-off-by: Andrew Ruder <andrew.ruder at elecsyscorp.com>
Cc: Joe Hershberger <joe.hershberger at gmail.com>
---
 drivers/net/dm9000x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
index 415c4b7..258c8a3 100644
--- a/drivers/net/dm9000x.c
+++ b/drivers/net/dm9000x.c
@@ -54,6 +54,7 @@ TODO: external MII is not functional, only internal at the moment.
 #include <net.h>
 #include <asm/io.h>
 #include <dm9000.h>
+#include <linux/compiler.h>
 
 #include "dm9000x.h"
 
@@ -124,7 +125,7 @@ static void DM9000_iow(int reg, u8 value);
 #endif
 
 #ifdef CONFIG_DM9000_DEBUG
-static void
+static __maybe_unused void
 dump_regs(void)
 {
 	DM9000_DBG("\n");
-- 
2.1.4



More information about the U-Boot mailing list