From: Wolfgang Denk Date: Sat, 5 Nov 2011 05:12:58 +0000 (+0000) Subject: drivers/net/pcnet.c: Change debug code to fix build warning X-Git-Tag: v2011.12-rc1~252 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=138b60895dff0e03301937901aee3d57ca2a067c;p=u-boot drivers/net/pcnet.c: Change debug code to fix build warning Fix: pcnet.c: In function 'pcnet_probe': pcnet.c:247:8: warning: variable 'chipname' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk Cc: Wolfgang Grandegger --- diff --git a/drivers/net/pcnet.c b/drivers/net/pcnet.c index e994cb6901..45066c8fea 100644 --- a/drivers/net/pcnet.c +++ b/drivers/net/pcnet.c @@ -30,21 +30,12 @@ #include #include -#if 0 #define PCNET_DEBUG_LEVEL 0 /* 0=off, 1=init, 2=rx/tx */ -#endif -#if PCNET_DEBUG_LEVEL > 0 -#define PCNET_DEBUG1(fmt,args...) printf (fmt ,##args) -#if PCNET_DEBUG_LEVEL > 1 -#define PCNET_DEBUG2(fmt,args...) printf (fmt ,##args) -#else -#define PCNET_DEBUG2(fmt,args...) -#endif -#else -#define PCNET_DEBUG1(fmt,args...) -#define PCNET_DEBUG2(fmt,args...) -#endif +#define PCNET_DEBUG1(fmt,args...) \ + debug_cond(PCNET_DEBUG_LEVEL > 0, fmt ,##args) +#define PCNET_DEBUG2(fmt,args...) \ + debug_cond(PCNET_DEBUG_LEVEL > 1, fmt ,##args) #if !defined(CONF_PCNET_79C973) && defined(CONF_PCNET_79C975) #error "Macro for PCnet chip version is not defined!"