[PATCH] usb-storage: SCSI glue: use pr_fmt and pr_err

From: Matthias Maennich
Date: Tue Sep 17 2019 - 19:11:10 EST


Follow common practice and retire printk(KERN_ERR ...) in favor of
pr_fmt and pr_err.

Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: usb-storage@xxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Matthias Maennich <maennich@xxxxxxxxxx>
---
drivers/usb/storage/scsiglue.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
index 6737fab94959..0b6fa225b352 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,7 @@ 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);
+ pr_err("Error in %s: us->srb = %p\n", __func__, us->srb);
return SCSI_MLQUEUE_HOST_BUSY;
}

--
2.23.0.237.gc6a4ce50a0-goog