public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Rupesh Gujare <rupesh.gujare@atmel.com>
Cc: devel@linuxdriverproject.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, shigekatsu.tateno@atmel.com
Subject: Re: [PATCH] staging: ozwpan: Convert printk to dev_dbg()
Date: Tue, 25 Jun 2013 10:57:17 -0700	[thread overview]
Message-ID: <20130625175717.GA26914@kroah.com> (raw)
In-Reply-To: <51C9D818.1090702@atmel.com>

On Tue, Jun 25, 2013 at 06:49:12PM +0100, Rupesh Gujare wrote:
> On 25/06/13 18:02, Greg KH wrote:
> >On Tue, Jun 25, 2013 at 05:30:02PM +0100, Rupesh Gujare wrote:
> >>convert all debug messages from printk to dev_dbg() & add kernel config to
> >>enable/disable these messages during compilation.
> >No, just use the built-in dynamic debug code in the kernel, no need to
> >provide any new macros or functions or most importantly, no new Kconfig
> >options.
> >
> 
> New macro (oz_trace) is being used as pointer to "struct device *"
> is not available in all functions for dev_dbg() function.
> Please let me know if there is better way to handle this, I will be
> happy to rework on this.

Then use pr_debug() for the places you don't have a struct device *,
everywhere else should use dev_dbg().

> As well new Kconfig option was added to pass CFLAGS to compiler, so
> that dev_dbg will get compiled on system where DYNAMIC_DEBUG is not
> defined.

No, just rely on the overall config option, do you really think the
kernel should have an individual Kconfig debug option for every
individual driver?  We have been removing these for years, don't move
backwards in this area please.

> I was assuming that it is a standard practice, as I can find similar
> Kconfig option for other drivers. Or am I wrong in my understanding
> ?

Those options for those drivers should be removed, they were added
before we had the dynamic debug option.  New drivers shouldn't have this
at all.

> Main idea here is to replace printk with dev_dbg(), which gives us
> option to enable individual log during runtime if DYNAMIC_DEBUG is
> enabled & provide mechanism to compile this when DYNAMIC_DEBUG is
> not enabled.
> 
> Again many of these logs will be removed in future, as currently
> there are too many logs which are not required, hence idea is to
> only change macro & then remove remaining logs in future.

No, remove the unneeded calls now, why wait?

thanks,

greg k-h

      parent reply	other threads:[~2013-06-25 17:57 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 16:30 [PATCH] staging: ozwpan: Convert printk to dev_dbg() Rupesh Gujare
2013-06-25 16:40 ` Joe Perches
2013-06-25 17:02 ` Greg KH
2013-06-25 17:29   ` Joe Perches
2013-06-25 17:38     ` Greg KH
2013-06-25 17:56       ` Joe Perches
2013-06-25 18:03         ` Joe Perches
2013-06-26 17:51           ` Jason Baron
2013-06-26  1:00       ` [PATCH] staging: ozwpan: Use normal Makefile, convert oz_trace to oz_dbg Joe Perches
2013-06-26 11:53         ` Rupesh Gujare
2013-06-26 13:56           ` Joe Perches
2013-06-26 14:19             ` Joe Perches
2013-07-04 12:35             ` [PATCH v2 0/5] Replace debug macro Rupesh Gujare
2013-07-04 14:31               ` Joe Perches
2013-07-04 12:35             ` [PATCH v2 1/5] staging: ozwpan: Remove extra debug logs Rupesh Gujare
2013-07-04 12:35             ` [PATCH v2 2/5] staging: ozwpan: Replace oz_trace with oz_dbg Rupesh Gujare
2013-07-04 12:35             ` [PATCH v2 3/5] staging: ozwpan: Remove old debug macro Rupesh Gujare
2013-07-04 12:35             ` [PATCH v2 4/5] staging: ozwpan: Convert macro to function Rupesh Gujare
2013-07-04 12:35             ` [PATCH v2 5/5] staging: ozwpan: Rename Kbuild to Makefile Rupesh Gujare
2013-07-04 12:45               ` Rupesh Gujare
2013-07-22 17:43                 ` Rupesh Gujare
2013-07-22 17:55                   ` Greg Kroah-Hartman
2013-07-22 22:08                     ` Gujare, Rupesh
2013-07-23 12:44                     ` [PATCH v3 0/5] staging: ozwpan: Replace debug macro Rupesh Gujare
2013-07-23 12:44                     ` [PATCH v3 1/5] staging: ozwpan: Remove extra debug logs Rupesh Gujare
2013-07-23 12:45                     ` [PATCH v3 2/5] staging: ozwpan: Replace oz_trace with oz_dbg Rupesh Gujare
2013-07-23 12:45                     ` [PATCH v3 3/5] staging: ozwpan: Remove old debug macro Rupesh Gujare
2013-07-23 12:45                     ` [PATCH v3 4/5] staging: ozwpan: Convert macro to function Rupesh Gujare
2013-07-23 12:45                     ` [PATCH v3 5/5] staging: ozwpan: Rename Kbuild to Makefile Rupesh Gujare
2013-06-26 17:46     ` [PATCH] staging: ozwpan: Convert printk to dev_dbg() Jason Baron
2013-06-27  0:26       ` Joe Perches
2013-06-25 17:49   ` Rupesh Gujare
2013-06-25 17:55     ` Alan Stern
2013-06-25 17:57     ` Greg KH [this message]

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=20130625175717.GA26914@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@linuxdriverproject.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rupesh.gujare@atmel.com \
    --cc=shigekatsu.tateno@atmel.com \
    /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