usb-storage: SCSI glue: use dev_err instead of printk
authorMatthias Maennich <maennich@google.com>
Wed, 2 Oct 2019 11:03:12 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Oct 2019 11:11:08 +0000 (13:11 +0200)
Follow common practice and retire printk(KERN_ERR ...) in favor of
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>
Link: https://lore.kernel.org/r/20191002110312.75749-1-maennich@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/storage/scsiglue.c

index 6737fab..4c0c247 100644 (file)
@@ -379,8 +379,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;
        }