linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: linux-kernel@vger.kernel.org, stern@rowland.harvard.edu,
	linux-usb@vger.kernel.org, usb-storage@lists.one-eyed-alien.net
Subject: Re: [PATCH v2] drivers: usb: storage: prefer pr_*() macros over bare printk()
Date: Thu, 3 Dec 2020 16:21:36 +0100	[thread overview]
Message-ID: <X8kCgO+2hAgkUqL8@kroah.com> (raw)
In-Reply-To: <20201203141634.28850-1-info@metux.net>

On Thu, Dec 03, 2020 at 03:16:34PM +0100, Enrico Weigelt, metux IT consult wrote:
> pr_*() printing helpers are preferred over using bare printk().
> 
> changes v2: fixed ugly typo

Don't put that in the changelog, it goes below the --- line, as is
documented.



> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
> ---
>  drivers/usb/storage/alauda.c     | 23 ++++++++------------
>  drivers/usb/storage/ene_ub6250.c | 20 ++++++++---------
>  drivers/usb/storage/freecom.c    |  2 +-
>  drivers/usb/storage/sddr09.c     | 46 +++++++++++++++++-----------------------
>  drivers/usb/storage/sddr55.c     |  7 +++---
>  5 files changed, 43 insertions(+), 55 deletions(-)
> 
> diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c
> index 20b857e97e60..5806f1bee471 100644
> --- a/drivers/usb/storage/alauda.c
> +++ b/drivers/usb/storage/alauda.c
> @@ -622,9 +622,8 @@ static int alauda_read_map(struct us_data *us, unsigned int zone)
>  
>  		/* check even parity */
>  		if (parity[data[6] ^ data[7]]) {
> -			printk(KERN_WARNING
> -			       "alauda_read_map: Bad parity in LBA for block %d"
> -			       " (%02X %02X)\n", i, data[6], data[7]);
> +			pr_warn("alauda_read_map: Bad parity in LBA for block %d"
> +				" (%02X %02X)\n", i, data[6], data[7]);

Please use dev_warn() and friends instead.  This is a driver, it has a
device, it should never use "raw" printk, or pr_* calls.

thanks,

greg k-h

      reply	other threads:[~2020-12-03 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 14:16 [PATCH v2] drivers: usb: storage: prefer pr_*() macros over bare printk() Enrico Weigelt, metux IT consult
2020-12-03 15:21 ` 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=X8kCgO+2hAgkUqL8@kroah.com \
    --to=greg@kroah.com \
    --cc=info@metux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --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;
as well as URLs for NNTP newsgroup(s).