linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Streetman <ddstreet@ieee.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] plist: include -DDEBUG if CONFIG_DEBUG_PI_LIST
Date: Mon, 5 May 2014 10:35:01 -0400	[thread overview]
Message-ID: <CALZtONB-wT16fPX7GjBVFO_5Bof3=zxviG22p6_9ymbnzA9QAA@mail.gmail.com> (raw)
In-Reply-To: <20140502164148.44c0674b@gandalf.local.home>

On Fri, May 2, 2014 at 4:41 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Fri,  2 May 2014 16:23:43 -0400
> Dan Streetman <ddstreet@ieee.org> wrote:
>
>> lib/plist.c uses pr_debug() in its test function, which is compiled
>> and run only when CONFIG_DEBUG_PI_LIST in set; however pr_debug()
>> is compiled out unless -DDEBUG is set for the file.
>>
>> Update lib/Makefile to add -DDEBUG to CFLAGS_plist.o if
>> CONFIG_DEBUG_PI_LIST is set, so that the pr_debug() output from
>> plist_test() is shown.
>
> Why not just use printk(KERN_DEBUG ...) then if we always want to print
> it?
>
> You could just place
>
> #define DEBUG
>
> in plist.c as well. Although I think just switching to printk() is
> better.

Agreed - since the entire function is already inside
CONFIG_DEBUG_PI_LIST, there's no need to additionally require DEBUG so
we should just use printk.  New patch to follow.

Thanks!

>
> -- Steve
>
>>
>> Signed-off-by: Dan Streetman <ddstreet@ieee.org>
>> ---
>>  lib/Makefile | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/lib/Makefile b/lib/Makefile
>> index 0cd7b68..fd1f4c8 100644
>> --- a/lib/Makefile
>> +++ b/lib/Makefile
>> @@ -39,6 +39,10 @@ CFLAGS_kobject.o += -DDEBUG
>>  CFLAGS_kobject_uevent.o += -DDEBUG
>>  endif
>>
>> +ifeq ($(CONFIG_DEBUG_PI_LIST),y)
>> +CFLAGS_plist.o += -DDEBUG
>> +endif
>> +
>>  obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
>>  obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o
>>  obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
>

  reply	other threads:[~2014-05-05 14:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-02 20:23 [PATCH] plist: include -DDEBUG if CONFIG_DEBUG_PI_LIST Dan Streetman
2014-05-02 20:41 ` Steven Rostedt
2014-05-05 14:35   ` Dan Streetman [this message]
2014-05-05 14:43     ` [PATCH] plist: replace pr_debug with printk in plist_test() Dan Streetman
2014-05-05 14:52       ` Steven Rostedt
2014-05-05 20:35       ` Andrew Morton
2014-05-05 20:52         ` Joe Perches
2014-05-06 12:30         ` Dan Streetman
2014-05-06 15:08           ` [PATCH] Documentation: expand/clarify debug documentation Dan Streetman
2014-05-06 15:44           ` [PATCH] plist: replace pr_debug with printk in plist_test() Fabian Frederick
2014-05-07 14:21             ` Dan Streetman
2014-05-07 14:35               ` Steven Rostedt
2014-05-07 18:10                 ` Joe Perches
2014-05-07 18:19                   ` Steven Rostedt
2014-05-07 18:37                     ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALZtONB-wT16fPX7GjBVFO_5Bof3=zxviG22p6_9ymbnzA9QAA@mail.gmail.com' \
    --to=ddstreet@ieee.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).