From: Matthias Maennich <maennich@google.com>
To: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com, maennich@google.com,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
usb-storage@lists.one-eyed-alien.net
Subject: [PATCH v2] usb-storage: SCSI glue: use pr_fmt and pr_err
Date: Wed, 18 Sep 2019 18:53:04 +0100 [thread overview]
Message-ID: <20190918175304.219849-1-maennich@google.com> (raw)
In-Reply-To: <20190917231031.81341-1-maennich@google.com>
Follow common practice and retire printk(KERN_ERR ...) in favor of
pr_fmt and dev_err().
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: usb-storage@lists.one-eyed-alien.net
Signed-off-by: Matthias Maennich <maennich@google.com>
---
drivers/usb/storage/scsiglue.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 6737fab94959..afc4e3221369 100644
--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -28,6 +28,8 @@
* status of a command.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/blkdev.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
@@ -379,8 +381,8 @@ static int queuecommand_lck(struct scsi_cmnd *srb,
/* check for state-transition errors */
if (us->srb != NULL) {
- printk(KERN_ERR "usb-storage: Error in %s: us->srb = %p\n",
- __func__, us->srb);
+ dev_err(&us->pusb_intf->dev,
+ "Error in %s: us->srb = %p\n", __func__, us->srb);
return SCSI_MLQUEUE_HOST_BUSY;
}
--
2.23.0.237.gc6a4ce50a0-goog
next prev parent reply other threads:[~2019-09-18 17:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-17 23:10 [PATCH] usb-storage: SCSI glue: use pr_fmt and pr_err Matthias Maennich
2019-09-18 14:39 ` Alan Stern
2019-09-18 17:53 ` Matthias Maennich [this message]
2019-09-18 18:39 ` [PATCH v2] " Alan Stern
2019-10-02 11:03 ` [PATCH v3] usb-storage: SCSI glue: use dev_err instead of printk Matthias Maennich
2019-10-04 9:57 ` [PATCH] depmod: create and use System.map.no_namespaces Matthias Maennich
2019-10-04 18:25 ` Lucas De Marchi
2019-10-05 7:53 ` Masahiro Yamada
2019-10-07 6:46 ` Matthias Maennich
2019-10-07 11:25 ` Jessica Yu
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=20190918175304.219849-1-maennich@google.com \
--to=maennich@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@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