Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6872113ybe; Wed, 18 Sep 2019 10:23:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzTDi4/ORQc68SmiE2Uqda2Q+4p7zUC9Az9RWIb6g2KkfMV8paeqSZU/J2PUrDX+W8pEt4 X-Received: by 2002:a17:906:6c7:: with SMTP id v7mr10680590ejb.27.1568827390908; Wed, 18 Sep 2019 10:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568827390; cv=none; d=google.com; s=arc-20160816; b=j2LxqGZ/gOiiHAdC1EA/qIbLYWmguTbWmL+w+B+fUjq7EjyIVFYh1z4lXpmdEfRKRj ZaBwwXdX5AzFUUcpc3asuyrVoL9/gFOrtWzBw8dvMG0HONfncAENbg29eoQBDX1JPZRJ d8raGlN5eOy6VZR9t4NZIxLHNTCgBFb5vkPLIUldrAye/0Qn0KjhmNcA7Wx9F1T+qgaf VCYrVysMesKqUuT1z+dBYVWWaULylLaEev/tHciaQKNa4rr5Nz+zxPNyivJlOWusyb8e Ml/VZcieUasWYzo65VmM/fWZ9BvE+/iuat9lGRfU1AMh8ifIBTdzTgdaj8K8wjXYdfx3 RRTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=XlyOo8I32+Y5bTJCPQQ3/53HBQxY26gPANK1iS824Ks=; b=zshDlBGs8MhicJGB9WOgxfEnUbrNDg2bB0lLr1D/WMrjyabp0YbBgFemzM3osFJFFF ZvH4ZiiDaligApfMwnaU40fSZZz9qWyW1gD+g3eUH1nujuDePFkvTutSg8cLOP6qZDld 48vJGHS1gufjUY9Iidn2Y1MMpEvd5mdeFYwMc9kHC0JEWPZKb/YK6eocEy2txFrjGIFN MIXNt4od4csjSCHHYrLc6HEqke99QS3d7vrt6IPqVFBODRVxbjJgXoThYcGr/OhFl7G2 g9RJRmrBr1waMLBJHwuRd2afgqguXteJHc8sLUiQkkzl2fGPid8u5e708c8QT3L4vDi3 Q+3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k8si3182893edx.450.2019.09.18.10.22.46; Wed, 18 Sep 2019 10:23:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731311AbfIROji (ORCPT + 99 others); Wed, 18 Sep 2019 10:39:38 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:53284 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1725902AbfIROji (ORCPT ); Wed, 18 Sep 2019 10:39:38 -0400 Received: (qmail 3498 invoked by uid 2102); 18 Sep 2019 10:39:37 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Sep 2019 10:39:37 -0400 Date: Wed, 18 Sep 2019 10:39:37 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Matthias Maennich cc: linux-kernel@vger.kernel.org, , Greg Kroah-Hartman , Subject: Re: [PATCH] usb-storage: SCSI glue: use pr_fmt and pr_err In-Reply-To: <20190917231031.81341-1-maennich@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Sep 2019, Matthias Maennich wrote: > Follow common practice and retire printk(KERN_ERR ...) in favor of > pr_fmt and pr_err. As long as you're changing this, why not change it to dev_err() instead? That would be a lot more useful. > Cc: Alan Stern > Cc: Greg Kroah-Hartman > Cc: usb-storage@lists.one-eyed-alien.net > Signed-off-by: Matthias Maennich > --- > 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 > #include > #include > @@ -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; > } dev_err(&us->pusb_intf->dev, "Error in ... Alan Stern