From: Pavan Savoy on

--- On Wed, 31/3/10, Pavan Savoy <pavan_savoy(a)ti.com> wrote:

> From: Pavan Savoy <pavan_savoy(a)ti.com>
> Subject: Re: [PATCH] drivers:staging: sources for ST core
> To: gregkh(a)suse.de
> Cc: "Marcel Holtmann" <marcel(a)holtmann.org>, alan(a)lxorguk.ukuu.org.uk
> Date: Wednesday, 31 March, 2010, 4:11 AM
> --- On Wed, 31/3/10, Pavan Savoy
> <pavan_savoy(a)yahoo.co.in>
> wrote:
>
> > From: Pavan Savoy <pavan_savoy(a)yahoo.co.in>
> > Subject: Re: [PATCH] drivers:staging: sources for ST
> core
> > To: "pavan_savoy(a)yahoo.co.in"
> <pavan_savoy(a)yahoo.co.in>
> > Date: Wednesday, 31 March, 2010, 4:06 AM
> > > From: Greg KH [gregkh(a)suse.de]
> > > Sent: Wednesday, March 31, 2010 3:17 AM
> > > To: Savoy, Pavan
> > > Cc: Alan Cox; marcel(a)holtmann.org;
> > > linux-kernel(a)vger.kernel.org
> > > Subject: Re: [PATCH] drivers:staging: sources for
> ST
> > core
> > >
> > > On Wed, Mar 31, 2010 at 02:35:55AM +0530, Pavan
> Savoy
> > > wrote:
> > > > 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.
> > >
> > > No, a driver should use dev_dbg() and other
> > dev_printk()
> > > calls, not
> > > pr_debug() or anything like that.
> > >
> > > Please don't roll your own formats, use the ones
> that
> > are
> > > well defined
> > > and uniquely describe your driver and device in
> a
> > format
> > > that the whole
> > > kernel uses.
> >
>

forgot lkml the last time..

Nope, I couldn't find any instance of struct device at all,
I need that to use dev_dbg right ? - None of the tty_*
structure accessible by ldiscs seems to have a reference to
it.
Also I happened to look at other line discipline driver, if
they have a smarter way of doing this, Nope - n_tty, n_hdlc,
n_slip all seem to use plain old printks.

Any clues ??


> >
> > > thanks,
> > >
> > > greg k-h
> >
> >
> > � � � Your Mail works best with the New
> > Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
> >
>
>
> � � � Your Mail works best with the New
> Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
>


Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Joe Perches on
On Wed, 31 Mar 2010, Pavan Savoy wrote:
> +bool is_protocol_list_empty(void)
> +{
> + unsigned char i = 0;
> + pr_debug(" %s ", __func__);

You need to add terminating '\n's to most all these messages.
It's also not necessary to have leading or trailing whitespace.

> +#ifdef VERBOSE
> + printk(KERN_ERR "start data..\n");
> + for (i = 0; i < count; i++) /* no newlines for each datum */
> + printk(" %x", data[i]);
> + printk(KERN_ERR "\n ..end data\n");
> +#endif

print_hex_dump(KERN_ERR, "data: ", DUMP_PREFIX_OFFSET, 16, 1,
data, count, true);

cheers, Joe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Wed, Mar 31, 2010 at 04:20:22AM +0530, Pavan Savoy wrote:
>
> --- On Wed, 31/3/10, Pavan Savoy <pavan_savoy(a)ti.com> wrote:
>
> > From: Pavan Savoy <pavan_savoy(a)ti.com>
> > Subject: Re: [PATCH] drivers:staging: sources for ST core
> > To: gregkh(a)suse.de
> > Cc: "Marcel Holtmann" <marcel(a)holtmann.org>, alan(a)lxorguk.ukuu.org.uk
> > Date: Wednesday, 31 March, 2010, 4:11 AM
> > --- On Wed, 31/3/10, Pavan Savoy
> > <pavan_savoy(a)yahoo.co.in>
> > wrote:
> >
> > > From: Pavan Savoy <pavan_savoy(a)yahoo.co.in>
> > > Subject: Re: [PATCH] drivers:staging: sources for ST
> > core
> > > To: "pavan_savoy(a)yahoo.co.in"
> > <pavan_savoy(a)yahoo.co.in>
> > > Date: Wednesday, 31 March, 2010, 4:06 AM
> > > > From: Greg KH [gregkh(a)suse.de]
> > > > Sent: Wednesday, March 31, 2010 3:17 AM
> > > > To: Savoy, Pavan
> > > > Cc: Alan Cox; marcel(a)holtmann.org;
> > > > linux-kernel(a)vger.kernel.org
> > > > Subject: Re: [PATCH] drivers:staging: sources for
> > ST
> > > core
> > > >
> > > > On Wed, Mar 31, 2010 at 02:35:55AM +0530, Pavan
> > Savoy
> > > > wrote:
> > > > > 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.
> > > >
> > > > No, a driver should use dev_dbg() and other
> > > dev_printk()
> > > > calls, not
> > > > pr_debug() or anything like that.
> > > >
> > > > Please don't roll your own formats, use the ones
> > that
> > > are
> > > > well defined
> > > > and uniquely describe your driver and device in
> > a
> > > format
> > > > that the whole
> > > > kernel uses.
> > >
> >
>
> forgot lkml the last time..
>
> Nope, I couldn't find any instance of struct device at all,
> I need that to use dev_dbg right ? - None of the tty_*
> structure accessible by ldiscs seems to have a reference to
> it.
> Also I happened to look at other line discipline driver, if
> they have a smarter way of doing this, Nope - n_tty, n_hdlc,
> n_slip all seem to use plain old printks.
>
> Any clues ??

Sorry, you are correct, we only have a struct kref right now for tty
core objects, not a struct device. So nevermind, this should be fine.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Pavan Savoy on
--- On Wed, 31/3/10, Greg KH <gregkh(a)suse.de> wrote:

> From: Greg KH <gregkh(a)suse.de>
> Subject: Re: [PATCH] drivers:staging: sources for ST core
> To: "Pavan Savoy" <pavan_savoy(a)ti.com>
> Cc: "Marcel Holtmann" <marcel(a)holtmann.org>, alan(a)lxorguk.ukuu.org.uk, linux-kernel(a)vger.kernel.org
> Date: Wednesday, 31 March, 2010, 11:00 PM
> On Wed, Mar 31, 2010 at 04:20:22AM
> +0530, Pavan Savoy wrote:
> >
> > --- On Wed, 31/3/10, Pavan Savoy <pavan_savoy(a)ti.com>
> wrote:
> >
> > > From: Pavan Savoy <pavan_savoy(a)ti.com>
> > > Subject: Re: [PATCH] drivers:staging: sources for
> ST core
> > > To: gregkh(a)suse.de
> > > Cc: "Marcel Holtmann" <marcel(a)holtmann.org>,
> alan(a)lxorguk.ukuu.org.uk
> > > Date: Wednesday, 31 March, 2010, 4:11 AM
> > > --- On Wed, 31/3/10, Pavan Savoy
> > > <pavan_savoy(a)yahoo.co.in>
> > > wrote:
> > >
> > > > From: Pavan Savoy <pavan_savoy(a)yahoo.co.in>
> > > > Subject: Re: [PATCH] drivers:staging:
> sources for ST
> > > core
> > > > To: "pavan_savoy(a)yahoo.co.in"
> > > <pavan_savoy(a)yahoo.co.in>
> > > > Date: Wednesday, 31 March, 2010, 4:06 AM
> > > > > From: Greg KH [gregkh(a)suse.de]
> > > > > Sent: Wednesday, March 31, 2010 3:17
> AM
> > > > > To: Savoy, Pavan
> > > > > Cc: Alan Cox; marcel(a)holtmann.org;
> > > > > linux-kernel(a)vger.kernel.org
> > > > > Subject: Re: [PATCH] drivers:staging:
> sources for
> > > ST
> > > > core
> > > > >
> > > > > On Wed, Mar 31, 2010 at 02:35:55AM
> +0530, Pavan
> > > Savoy
> > > > > wrote:
> > > > > > 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.
> > > > >
> > > > > No, a driver should use dev_dbg() and
> other
> > > > dev_printk()
> > > > > calls, not
> > > > > pr_debug() or anything like that.
> > > > >
> > > > > Please don't roll your own formats, use
> the ones
> > > that
> > > > are
> > > > > well defined
> > > > > and uniquely describe your driver and
> device in
> > > a
> > > > format
> > > > > that the whole
> > > > > kernel uses.
> > > >
> > >
> >
> > forgot lkml the last time..
> >
> > Nope, I couldn't find any instance of struct device at
> all,
> > I need that to use dev_dbg right ? - None of the
> tty_*
> > structure accessible by ldiscs seems to have a
> reference to
> > it.
> > Also I happened to look at other line discipline
> driver, if
> > they have a smarter way of doing this, Nope - n_tty,
> n_hdlc,
> > n_slip all seem to use plain old printks.
> >�
> > Any clues ??
>
> Sorry, you are correct, we only have a struct kref right
> now for tty
> core objects, not a struct device.� So nevermind, this
> should be fine.

Oh cool. Thanks, So that leaves me with 1 pending item from Alan which is to tie these 3 modules (KIM/Core/LL) up onto a TTY device specific context, and avoid all global ptrs.

So without that is it good to go in ?

> thanks,
>
> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo(a)vger.kernel.org
> More majordomo info at� http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at� http://www.tux.org/lkml/
>


Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Wed, Mar 31, 2010 at 11:32:39PM +0530, Pavan Savoy wrote:
> --- On Wed, 31/3/10, Greg KH <gregkh(a)suse.de> wrote:
>
> > From: Greg KH <gregkh(a)suse.de>
> > Subject: Re: [PATCH] drivers:staging: sources for ST core
> > To: "Pavan Savoy" <pavan_savoy(a)ti.com>
> > Cc: "Marcel Holtmann" <marcel(a)holtmann.org>, alan(a)lxorguk.ukuu.org.uk, linux-kernel(a)vger.kernel.org
> > Date: Wednesday, 31 March, 2010, 11:00 PM
> > On Wed, Mar 31, 2010 at 04:20:22AM
> > +0530, Pavan Savoy wrote:
> > >
> > > --- On Wed, 31/3/10, Pavan Savoy <pavan_savoy(a)ti.com>
> > wrote:
> > >
> > > > From: Pavan Savoy <pavan_savoy(a)ti.com>
> > > > Subject: Re: [PATCH] drivers:staging: sources for
> > ST core
> > > > To: gregkh(a)suse.de
> > > > Cc: "Marcel Holtmann" <marcel(a)holtmann.org>,
> > alan(a)lxorguk.ukuu.org.uk
> > > > Date: Wednesday, 31 March, 2010, 4:11 AM
> > > > --- On Wed, 31/3/10, Pavan Savoy
> > > > <pavan_savoy(a)yahoo.co.in>
> > > > wrote:
> > > >
> > > > > From: Pavan Savoy <pavan_savoy(a)yahoo.co.in>
> > > > > Subject: Re: [PATCH] drivers:staging:
> > sources for ST
> > > > core
> > > > > To: "pavan_savoy(a)yahoo.co.in"
> > > > <pavan_savoy(a)yahoo.co.in>
> > > > > Date: Wednesday, 31 March, 2010, 4:06 AM
> > > > > > From: Greg KH [gregkh(a)suse.de]
> > > > > > Sent: Wednesday, March 31, 2010 3:17
> > AM
> > > > > > To: Savoy, Pavan
> > > > > > Cc: Alan Cox; marcel(a)holtmann.org;
> > > > > > linux-kernel(a)vger.kernel.org
> > > > > > Subject: Re: [PATCH] drivers:staging:
> > sources for
> > > > ST
> > > > > core
> > > > > >
> > > > > > On Wed, Mar 31, 2010 at 02:35:55AM
> > +0530, Pavan
> > > > Savoy
> > > > > > wrote:
> > > > > > > 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.
> > > > > >
> > > > > > No, a driver should use dev_dbg() and
> > other
> > > > > dev_printk()
> > > > > > calls, not
> > > > > > pr_debug() or anything like that.
> > > > > >
> > > > > > Please don't roll your own formats, use
> > the ones
> > > > that
> > > > > are
> > > > > > well defined
> > > > > > and uniquely describe your driver and
> > device in
> > > > a
> > > > > format
> > > > > > that the whole
> > > > > > kernel uses.
> > > > >
> > > >
> > >
> > > forgot lkml the last time..
> > >
> > > Nope, I couldn't find any instance of struct device at
> > all,
> > > I need that to use dev_dbg right ? - None of the
> > tty_*
> > > structure accessible by ldiscs seems to have a
> > reference to
> > > it.
> > > Also I happened to look at other line discipline
> > driver, if
> > > they have a smarter way of doing this, Nope - n_tty,
> > n_hdlc,
> > > n_slip all seem to use plain old printks.
> > >?
> > > Any clues ??
> >
> > Sorry, you are correct, we only have a struct kref right
> > now for tty
> > core objects, not a struct device.? So nevermind, this
> > should be fine.
>
> Oh cool. Thanks, So that leaves me with 1 pending item from Alan which is to tie these 3 modules (KIM/Core/LL) up onto a TTY device specific context, and avoid all global ptrs.
>
> So without that is it good to go in ?

Yes, care to do that and resubmit?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/