public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Victor Dodon <printesoi@chromium.org>
Cc: linux-kernel@vger.kernel.org,
	Matthew Dharm <mdharm-usb@one-eyed-alien.net>,
	linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
	Gwendal Grignou <gwendal@chromium.org>
Subject: Re: [PATCH] usb: storage: make US_DEBUGPX print with LOGLEVEL_DEBUG
Date: Tue, 16 Feb 2016 16:40:52 -0800	[thread overview]
Message-ID: <20160217004052.GB3037@kroah.com> (raw)
In-Reply-To: <20160216234539.GA142596@printesoi1.mtv.corp.google.com>

On Tue, Feb 16, 2016 at 03:45:39PM -0800, Victor Dodon wrote:
> On Sun, Feb 14, 2016 at 05:20:21PM -0800, Greg Kroah-Hartman wrote:
> > On Wed, Feb 10, 2016 at 04:13:43PM -0800, Victor Dodon wrote:
> > > The US_DEBUGPX macro uses printk without specifying a kernel log level, so
> > > the default kernel log level is used, which may not match LOGLEVEL_DEBUG
> > > used in usb_stor_dbg. Use printk_emit with LOGLEVEL_DEBUG instead.
> > > 
> > > Signed-off-by: Victor Dodon <printesoi@chromium.org>
> > > ---
> > >  drivers/usb/storage/debug.h | 10 ++++++++--
> > >  1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > Can you just get rid of US_DEBUGPX() entirely please?  It shouldn't be
> > needed anymore, just use usb_stor_dbg() instead.
> 
> Using usb_stor_dbg() instead of US_DEBUGPX() in
> usb_stor_show_command() prints one byte per line with the full syslog
> header, like this:
> 
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876236] Command
> TEST_UNIT_READY (6 bytes)
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876242] bytes: 
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876249]  00
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876255]  00
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876261]  00
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876267]  00
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876273]  00
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876279]  00
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876285]
> 
> instead of the desired:
> 
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876236] Command
> TEST_UNIT_READY (6 bytes)
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876242] bytes: 
> 7,0,Feb 16 14:30:41,ubuntu,kernel:,[  422.876249]  00 00 00 00 00 00
> 
> this is why I think the US_DEBUGPX() macro is still needed.

Nope, fix the call to use the proper printk % modifier instead and you
will be fine.  No need to keep reinventing the wheel, we have had
support for byte streams in messages for probably over a decade now...

Nice try though :)

thanks,

greg k-h

      reply	other threads:[~2016-02-17  0:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11  0:13 [PATCH] usb: storage: make US_DEBUGPX print with LOGLEVEL_DEBUG Victor Dodon
2016-02-15  1:20 ` Greg Kroah-Hartman
2016-02-16 23:45   ` Victor Dodon
2016-02-17  0:40     ` Greg Kroah-Hartman [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=20160217004052.GB3037@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=gwendal@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdharm-usb@one-eyed-alien.net \
    --cc=printesoi@chromium.org \
    --cc=usb-storage@lists.one-eyed-alien.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