Re: [PATCH] drivers:staging: sources for ST core

From: Pavan Savoy
Date: Tue Mar 30 2010 - 17:06:08 EST



--- On Wed, 31/3/10, Greg KH <gregkh@xxxxxxx> wrote:

> From: Greg KH <gregkh@xxxxxxx>
> Subject: Re: [PATCH] drivers:staging: sources for ST core
> To: "Pavan Savoy" <pavan_savoy@xxxxxx>
> Cc: "Alan Cox" <alan@xxxxxxxxxxxxxxxxxxx>, marcel@xxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
> Date: Wednesday, 31 March, 2010, 2:08 AM
> On Tue, Mar 30, 2010 at 09:23:23PM
> +0530, Pavan Savoy wrote:
> > Alan,
> >
> > --- On Tue, 30/3/10, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
> wrote:
> >
> > > From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
> > > Subject: Re: [PATCH] drivers:staging: sources for
> ST core
> > > To: pavan_savoy@xxxxxx
> > > Cc: marcel@xxxxxxxxxxxx,
> gregkh@xxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
> pavan_savoy@xxxxxxxxxxx
> > > Date: Tuesday, 30 March, 2010, 4:52 PM
> > > > +/* all debug macros go in here
> > > */
> > > > +#define ST_DRV_ERR(fmt, arg...)?
> printk(KERN_ERR
> > > "(stc):"fmt"\n" , ## arg)
> > > > +#if defined(DEBUG)???
> > > ??? /* limited debug messages */
> > > > +#define ST_DRV_DBG(fmt, arg...)?
> > > printk(KERN_INFO "(stc):"fmt"\n" , ## arg)
> > > > +#define ST_DRV_VER(fmt, arg...)
> > > > +#elif defined(VERBOSE)???
> > > ??? /* very verbose */
> > > > +#define ST_DRV_DBG(fmt, arg...)?
> > > printk(KERN_INFO "(stc):"fmt"\n" , ## arg)
> > > > +#define ST_DRV_VER(fmt, arg...)?
> > > printk(KERN_INFO "(stc):"fmt"\n" , ## arg)
> > > > +#else /* error msgs only */
> > > > +#define ST_DRV_DBG(fmt, arg...)
> > > > +#define ST_DRV_VER(fmt, arg...)
> > > > +#endif
> > >
> > > As Greg said earlier - needs to be using the
> standard debug
> > > macros
> >
> > Agree - It's all there because of the organization's
> coding standards.
> > Will correct it.
>
> Might you also want to correct your organization's coding
> standards to
> follow the correct Linux kernel ones?  That way you
> will not have this
> problem in the future.
>
> thanks,
>
> greg k-h

So, something like the below is ok, I have defined my own pr_fmt, however default log level on my board is 7, and hence pr_info is a bit more annoying than usual.
So all verbose or debug messages including the data in/out of the UART are pr_debug.