lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1909181036090.1507-100000@iolanthe.rowland.org>
Date:   Wed, 18 Sep 2019 10:39:37 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Matthias Maennich <maennich@...gle.com>
cc:     linux-kernel@...r.kernel.org, <kernel-team@...roid.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        <usb-storage@...ts.one-eyed-alien.net>
Subject: Re: [PATCH] usb-storage: SCSI glue: use pr_fmt and pr_err

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 <stern@...land.harvard.edu>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: usb-storage@...ts.one-eyed-alien.net
> Signed-off-by: Matthias Maennich <maennich@...gle.com>
> ---
>  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;
>  	}

		dev_err(&us->pusb_intf->dev, "Error in ...

Alan Stern

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ