dynamic debug: resurrect old pr_debug() semantics as pr_devel()
authorMichael Ellerman <michael@ellerman.id.au>
Thu, 9 Apr 2009 21:48:24 +0000 (14:48 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Apr 2009 23:17:10 +0000 (16:17 -0700)
commit4ccb457966391295bd9b3644f6bdc9ddd97b6051
tree9e69013dcb736c33be6ce6a8facaa606f7016fbf
parent13977091a988fb0d21821c2221ddc920eba36b79
dynamic debug: resurrect old pr_debug() semantics as pr_devel()

pr_debug() used to produce zero code unless DEBUG was #defined.  This is
now no longer the case in practice[1].

There are places where it's useful to have debugging printks, but we don't
want them to generate any code in production kernels.

So add a new macro, pr_devel(), for _devel_opment, to provide the old
semantics, ie.  if the programmer doesn't explicitly enable debugging, no
code is produced.

[1]: You can turn CONFIG_DYNAMIC_DEBUG off, but it's enabled in at least
     one distro kernel, so it's not really a solution.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Greg Banks <gnb@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/kernel.h