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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190425194242.GA14372@kroah.com>
Date:   Thu, 25 Apr 2019 21:42:42 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Willy Wolff <willy.mh.wolff.ml@...il.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] driver core: printk to pr_*

On Mon, Apr 15, 2019 at 03:53:50PM +0100, Willy Wolff wrote:
> This patch change usage of printk to their pr_* equivalent.
> 
> Note, pr_debug(...) will not be emitted unless DEBUG is defined or
> CONFIG_DYNAMIC_DEBUG is enabled.
> 
> Signed-off-by: Willy Wolff <willy.mh.wolff.ml@...il.com>
> ---
> Changes in v2:
>   - Add a cover letter.
> 
>  drivers/base/dd.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index a823f469e53f..1bc4557a0f49 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -328,7 +328,7 @@ bool device_is_bound(struct device *dev)
>  static void driver_bound(struct device *dev)
>  {
>  	if (device_is_bound(dev)) {
> -		printk(KERN_WARNING "%s: device %s already bound\n",
> +		pr_warn("%s: device %s already bound\n",
>  			__func__, kobject_name(&dev->kobj));

This should just use dev_warn()

>  		return;
>  	}
> @@ -494,8 +494,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
>  	}
>  
>  	if (driver_sysfs_add(dev)) {
> -		printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
> -			__func__, dev_name(dev));
> +		pr_err("%s: driver_sysfs_add(%s) failed\n",
> +		       __func__, dev_name(dev));

dev_err()

>  		goto probe_failed;
>  	}
>  
> @@ -575,9 +575,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
>  		break;
>  	default:
>  		/* driver matched but the probe failed */
> -		printk(KERN_WARNING
> -		       "%s: probe of %s failed with error %d\n",
> -		       drv->name, dev_name(dev), ret);
> +		pr_warn("%s: probe of %s failed with error %d\n",
> +			drv->name, dev_name(dev), ret);

dev_warn()

>  	}
>  	/*
>  	 * Ignore errors returned by ->probe so that the next driver can try
> @@ -602,8 +601,8 @@ static int really_probe_debug(struct device *dev, struct device_driver *drv)
>  	ret = really_probe(dev, drv);
>  	rettime = ktime_get();
>  	delta = ktime_sub(rettime, calltime);
> -	printk(KERN_DEBUG "probe of %s returned %d after %lld usecs\n",
> -	       dev_name(dev), ret, (s64) ktime_to_us(delta));
> +	pr_debug("probe of %s returned %d after %lld usecs\n",
> +		 dev_name(dev), ret, (s64) ktime_to_us(delta));

dev_dbg()


>  	return ret;
>  }
>  
> @@ -687,8 +686,7 @@ static inline bool cmdline_requested_async_probing(const char *drv_name)
>  static int __init save_async_options(char *buf)
>  {
>  	if (strlen(buf) >= ASYNC_DRV_NAMES_MAX_LEN)
> -		printk(KERN_WARNING
> -			"Too long list of driver names for 'driver_async_probe'!\n");
> +		pr_warn("Too long list of driver names for 'driver_async_probe'!\n");

this one is ok.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ