[U-Boot] [PATCH 2/8] PPC: Fix mem_to_mem_idma2intr.c by renaming "debug" to "mmdebug"

Wolfgang Denk wd at denx.de
Mon Oct 3 16:28:38 CEST 2011


Dear Marek Vasut,

In message <1317603450-7527-3-git-send-email-marek.vasut at gmail.com> you wrote:
> From: Marek Vasut <marex at pollux.denx.de>

Please FIX your git setup.  This is NOT a valid address.

> Also, squash a checkpatch warning in if(debug != 0) part.
> 
> Signed-off-by: Marek Vasut <marek.vasut at gmail.com>
> ---
>  examples/standalone/mem_to_mem_idma2intr.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/examples/standalone/mem_to_mem_idma2intr.c b/examples/standalone/mem_to_mem_idma2intr.c
> index d0a75ea..8a986d3 100644
> --- a/examples/standalone/mem_to_mem_idma2intr.c
> +++ b/examples/standalone/mem_to_mem_idma2intr.c
> @@ -44,10 +44,10 @@ DECLARE_GLOBAL_DATA_PTR;
>  		}
>  #endif	/* STANDALONE */
>  
> -static int debug = 1;
> +static int mmdebug = 1;
>  
>  #define DEBUG(fmt, args...)	 {					\
> -	if(debug != 0) {						\
> +	if (mmdebug != 0) {						\
>  		printf("[%s %d %s]: ",__FILE__,__LINE__,__FUNCTION__);	\
>  		printf(fmt, ##args);					\
>  	}								\

All of this is bogus. The #define DEBUG itself should be fixed here.
And when debug resp. mmdebug is set to 1 anyway, and there is no
place anywhere to change that value, we can omit the "if (mmdebug != 0)",
too.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Who is the oldest inhabitant of this village?"
"We haven't got one; we had one, but he died three weeks ago."


More information about the U-Boot mailing list