public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Larry Kessler <kessler@us.ibm.com>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Richard J Moore <richardj_moore@uk.ibm.com>,
	Werner Almesberger <werner@almesberger.net>,
	James Keniston <kenistoj@us.ibm.com>
Subject: Re: Proposal:  Alan Cox dev_printk() with advanced logging support
Date: Thu, 12 Dec 2002 21:47:23 -0800	[thread overview]
Message-ID: <20021213054723.GC25099@kroah.com> (raw)
In-Reply-To: <3DF93A71.15678A95@us.ibm.com>

On Thu, Dec 12, 2002 at 05:40:01PM -0800, Larry Kessler wrote:
> 
> The version of dev_printk() being proposed here is essentially a
> generalized version of these macros, with a small change to Alan's 
> version so that driver name and bus_id are prepended to the 
> message...
> 
>   #define dev_printk(sev, dev, format, arg...) \
>       printk(sev "%s %s: " format, (dev).driver->name, (dev).bus_id, ##arg)
>  
> Then the logging macros in device.h can be re-written like this...
>    #define dev_err(dev, format, arg...)           \
>          dev_printk(KERN_ERR, (dev), format, ## arg)
> ..and so on.  

I'd gladly accept a patch to add dev_printk() like this right now, if
you want.  But make sure you get the proper spacing to work properly on
older versions of gcc.  Your above macros are incorrect with regards to
that :)

> What is _not_ addressed by this proposal are a number of other issues raised
> in the past, that still need addressing.  For example...
> 
> 1) (from Jeff Garzik) There's little or no stanardization of messages across
>    different (but similar) devices.
> 
> 2) (from Jeff Garzik and Greg KH) There's little or no guidance about what device
>    specific details are most useful for Problem Determination, Sys Administration,
>    etc.
> 
>    However, consistently identifying which device, plus state info from the device
>    struct, plus other info. like source file, function name, and line number,
>    provided with event logging, should certainly be useful in some cases. 
>    As the device struct continues to evolve, it will become more clear which
>    device attributes are appropriate to log.

I really feel strongly that these questions need to be answered properly
before we start adding the larger event logging stuff to the main kernel
tree.

Oh yeah, patches to actually _use_ these dev_*() functions would also be
appreciated.  It looks like only one very tiny driver subsystem has
started to use them.  Patches from your group to change this would be
welcome.

thanks,

greg k-h

      reply	other threads:[~2002-12-13  5:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-13  1:40 Proposal: Alan Cox dev_printk() with advanced logging support Larry Kessler
2002-12-13  5:47 ` 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=20021213054723.GC25099@kroah.com \
    --to=greg@kroah.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=kenistoj@us.ibm.com \
    --cc=kessler@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=richardj_moore@uk.ibm.com \
    --cc=rusty@rustcorp.com.au \
    --cc=werner@almesberger.net \
    /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