public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Provide pr_debug() and pr_info().
@ 2011-04-01 16:12 Alexander Holler
  2011-04-01 17:56 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Holler @ 2011-04-01 16:12 UTC (permalink / raw)
  To: u-boot

Those are usefull for compatibility with the kernel.
Remove the locally defined pr_debug() in atmel_mci.c.

Signed-off-by: Alexander Holler <holler@ahsoftware.de>
---
 drivers/mmc/atmel_mci.c |    6 ------
 include/common.h        |    4 ++++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/mmc/atmel_mci.c b/drivers/mmc/atmel_mci.c
index 3946ffe..9d798ca 100644
--- a/drivers/mmc/atmel_mci.c
+++ b/drivers/mmc/atmel_mci.c
@@ -32,12 +32,6 @@
 
 #include "atmel_mci.h"
 
-#ifdef DEBUG
-#define pr_debug(fmt, args...) printf(fmt, ##args)
-#else
-#define pr_debug(...) do { } while(0)
-#endif
-
 #ifndef CONFIG_SYS_MMC_CLK_OD
 #define CONFIG_SYS_MMC_CLK_OD		150000
 #endif
diff --git a/include/common.h b/include/common.h
index 893af5c..a1fe8df 100644
--- a/include/common.h
+++ b/include/common.h
@@ -119,11 +119,15 @@ typedef volatile unsigned char	vu_char;
 #ifdef	DEBUG
 #define debug(fmt,args...)	printf (fmt ,##args)
 #define debugX(level,fmt,args...) if (DEBUG>=level) printf(fmt,##args);
+#define pr_debug(fmt, args...) printf(fmt, ##args)
 #else
 #define debug(fmt,args...)
 #define debugX(level,fmt,args...)
+#define pr_debug(fmt, args...)
 #endif	/* DEBUG */
 
+#define pr_info(fmt, args...)	printf (fmt, ##args)
+
 #define error(fmt, args...) do {					\
 		printf("ERROR: " fmt "\nat %s:%d/%s()\n",		\
 			##args, __FILE__, __LINE__, __func__);		\
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Provide pr_debug() and pr_info().
  2011-04-01 16:12 [U-Boot] [PATCH] Provide pr_debug() and pr_info() Alexander Holler
@ 2011-04-01 17:56 ` Wolfgang Denk
  2011-04-01 19:40   ` Alexander Holler
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Denk @ 2011-04-01 17:56 UTC (permalink / raw)
  To: u-boot

Dear Alexander Holler,

In message <1301674331-7476-1-git-send-email-holler@ahsoftware.de> you wrote:
> Those are usefull for compatibility with the kernel.
> Remove the locally defined pr_debug() in atmel_mci.c.
> 
> Signed-off-by: Alexander Holler <holler@ahsoftware.de>
> ---
>  drivers/mmc/atmel_mci.c |    6 ------
>  include/common.h        |    4 ++++
>  2 files changed, 4 insertions(+), 6 deletions(-)

NAK.  This is just adding redundant overhead.  I don;t want to have
yet another incarnation of macros which already exist.

Either replace the code in drivers/mmc/atmel_mci.c by a simple

	#define pr_debug(fmt, args...) debug(fmt, ##args)

or convert the code that uses this reference.

And pr_info() is completrely redundant and not used anywhere.


If you really think that pr_debug() is so much better than debug(),
then convert ALL code to use that.  But I am not a friend of such a
change.

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
"When the only  tool  you  have  is  a  hammer,  you  tend  to  treat
everything as if it were a nail."                    - Abraham Maslow

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Provide pr_debug() and pr_info().
  2011-04-01 17:56 ` Wolfgang Denk
@ 2011-04-01 19:40   ` Alexander Holler
  0 siblings, 0 replies; 3+ messages in thread
From: Alexander Holler @ 2011-04-01 19:40 UTC (permalink / raw)
  To: u-boot

Hello,

Am 01.04.2011 19:56, schrieb Wolfgang Denk:
> Dear Alexander Holler,
>
> In message<1301674331-7476-1-git-send-email-holler@ahsoftware.de>  you wrote:
>> Those are usefull for compatibility with the kernel.
>> Remove the locally defined pr_debug() in atmel_mci.c.
>>
>> Signed-off-by: Alexander Holler<holler@ahsoftware.de>
>> ---
>>   drivers/mmc/atmel_mci.c |    6 ------
>>   include/common.h        |    4 ++++
>>   2 files changed, 4 insertions(+), 6 deletions(-)
>
> NAK.  This is just adding redundant overhead.  I don;t want to have
> yet another incarnation of macros which already exist.
>
> Either replace the code in drivers/mmc/atmel_mci.c by a simple
>
> 	#define pr_debug(fmt, args...) debug(fmt, ##args)
>
> or convert the code that uses this reference.
>
> And pr_info() is completrely redundant and not used anywhere.
>
>
> If you really think that pr_debug() is so much better than debug(),
> then convert ALL code to use that.  But I am not a friend of such a
> change.

Than just forget this patch and someone else should add those macros to 
future imports of sources from the kernel. At least I will now do so.

Regards,

Alexander Holler

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-01 19:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01 16:12 [U-Boot] [PATCH] Provide pr_debug() and pr_info() Alexander Holler
2011-04-01 17:56 ` Wolfgang Denk
2011-04-01 19:40   ` Alexander Holler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox