diff mbox

powerpc/ps3: Use pr_devel() in ps3/mm.c

Message ID 8977d21ed6cf59b89f9a830d59968ce178420a46.1245722192.git.michael@ellerman.id.au (mailing list archive)
State Accepted, archived
Commit 7424639af480a05cac428ec7e7e38a11d6ff5734
Delegated to: Benjamin Herrenschmidt
Headers show

Commit Message

Michael Ellerman June 23, 2009, 1:56 a.m. UTC
The non-debug case in ps3/mm.c uses pr_debug(), so that the compiler
still does type checks etc. and doesn't complain about unused
variables in the non-debug case.

However with DEBUG=n and CONFIG_DYNAMIC_DEBUG=y there's still code
generated for those pr_debugs().

size before:
   text    data     bss     dec     hex filename
  17553	   4112	     88	  21753	   54f9	arch/powerpc/platforms/ps3/mm.o

size after:
   text    data     bss     dec     hex filename
   7377	    776	     88	   8241	   2031	arch/powerpc/platforms/ps3/mm.o

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
---
 arch/powerpc/platforms/ps3/mm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Geoff Levand June 23, 2009, 4:53 p.m. UTC | #1
On 06/22/2009 06:56 PM, Michael Ellerman wrote:
> The non-debug case in ps3/mm.c uses pr_debug(), so that the compiler
> still does type checks etc. and doesn't complain about unused
> variables in the non-debug case.
> 
> However with DEBUG=n and CONFIG_DYNAMIC_DEBUG=y there's still code
> generated for those pr_debugs().
> 
> Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> ---
>  arch/powerpc/platforms/ps3/mm.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Looks good, thanks.  I put it on the todo list to go through
the the remaining PS3 code to check for the same.

Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Michael Ellerman June 24, 2009, 12:55 a.m. UTC | #2
On Tue, 2009-06-23 at 09:53 -0700, Geoff Levand wrote:
> On 06/22/2009 06:56 PM, Michael Ellerman wrote:
> > The non-debug case in ps3/mm.c uses pr_debug(), so that the compiler
> > still does type checks etc. and doesn't complain about unused
> > variables in the non-debug case.
> > 
> > However with DEBUG=n and CONFIG_DYNAMIC_DEBUG=y there's still code
> > generated for those pr_debugs().
> > 
> > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> > ---
> >  arch/powerpc/platforms/ps3/mm.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> Looks good, thanks.  I put it on the todo list to go through
> the the remaining PS3 code to check for the same.

Cool, I've been slowly going through as I have time but I'll leave ps3
to you. I see ~270 uses in 9 files.

There are places where being able to dynamically enable the debug is
useful, but there are plenty where it's not also.

cheers
diff mbox

Patch

diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c
index 846eb8b..68f1397 100644
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -34,7 +34,7 @@ 
 #if defined(DEBUG)
 #define DBG udbg_printf
 #else
-#define DBG pr_debug
+#define DBG pr_devel
 #endif
 
 enum {