[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1908211520360.2223@nanos.tec.linutronix.de>
Date: Wed, 21 Aug 2019 15:21:22 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Matthias Maennich <maennich@...gle.com>
cc: linux-kernel@...r.kernel.org, kernel-team@...roid.com,
arnd@...db.de, geert@...ux-m68k.org, gregkh@...uxfoundation.org,
hpa@...or.com, jeyu@...nel.org, joel@...lfernandes.org,
kstewart@...uxfoundation.org, linux-arch@...r.kernel.org,
linux-kbuild@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
linux-modules@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-usb@...r.kernel.org, lucas.de.marchi@...il.com,
maco@...roid.com, maco@...gle.com, michal.lkml@...kovi.net,
mingo@...hat.com, oneukum@...e.com, pombredanne@...b.com,
sam@...nborg.org, sspatil@...gle.com, stern@...land.harvard.edu,
usb-storage@...ts.one-eyed-alien.net, x86@...nel.org,
yamada.masahiro@...ionext.com
Subject: Re: [PATCH v3 09/11] usb-storage: remove single-use define for
debugging
On Wed, 21 Aug 2019, Matthias Maennich wrote:
> USB_STORAGE was defined as "usb-storage: " and used in a single location
> as argument to printk. In order to be able to use the name
> 'USB_STORAGE', drop the definition and use the string directly for the
> printk call.
>
> Signed-off-by: Matthias Maennich <maennich@...gle.com>
> ---
> drivers/usb/storage/debug.h | 2 --
> drivers/usb/storage/scsiglue.c | 2 +-
> 2 files changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h
> index 6d64f342f587..16ce06039a4d 100644
> --- a/drivers/usb/storage/debug.h
> +++ b/drivers/usb/storage/debug.h
> @@ -29,8 +29,6 @@
>
> #include <linux/kernel.h>
>
> -#define USB_STORAGE "usb-storage: "
> -
> #ifdef CONFIG_USB_STORAGE_DEBUG
> void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb);
> void usb_stor_show_sense(const struct us_data *us, unsigned char key,
> diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
> index 05b80211290d..df4de8323eff 100644
> --- a/drivers/usb/storage/scsiglue.c
> +++ b/drivers/usb/storage/scsiglue.c
> @@ -379,7 +379,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",
> + printk(KERN_ERR "usb-storage: Error in %s: us->srb = %p\n",
> __func__, us->srb);
The proper fix for this is to use pr_fmt and convert the printk to pr_err().
Thanks,
tglx
Powered by blists - more mailing lists