[U-Boot] [PATCH 1/3] dm9000: mark dump_regs() function as unused

Tom Rini trini at ti.com
Mon Oct 20 21:10:57 CEST 2014


On Mon, Oct 20, 2014 at 09:59:43AM -0500, Andrew Ruder wrote:

> 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 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c
> index 4de9d41..50a36f3 100644
> --- a/drivers/net/dm9000x.c
> +++ b/drivers/net/dm9000x.c
> @@ -126,7 +126,7 @@ static void DM9000_iow(int reg, u8 value);
>  
>  #ifdef CONFIG_DM9000_DEBUG
>  static void
> -dump_regs(void)
> +dump_regs(void) __attribute__ ((unused))
>  {
>  	DM9000_DBG("\n");
>  	DM9000_DBG("NCR   (0x00): %02x\n", DM9000_ior(0));

Please make sure we have <linux/compiler.h> and use __unused (or
__maybe_unused?) here, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141020/df19f48d/attachment.pgp>


More information about the U-Boot mailing list