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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20141001135055.c849d1a34e9c687775a40a0f@linux-foundation.org>
Date:	Wed, 1 Oct 2014 13:50:55 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Paul McQuade <paulmcquad@...il.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org, neilb@...e.de,
	sasha.levin@...cle.com, rientjes@...gle.com, hughd@...gle.com,
	joe@...ches.com, paul.gortmaker@...driver.com,
	liwanp@...ux.vnet.ibm.com, n-horiguchi@...jp.nec.com,
	iamjoonsoo.kim@....com
Subject: Re: [PATCH] mm: ksm use pr_err instead of printk

On Wed,  1 Oct 2014 21:35:30 +0100 Paul McQuade <paulmcquad@...il.com> wrote:

> WARNING: Prefer: pr_err(...  to printk(KERN_ERR ...
> 
> Signed-off-by: Paul McQuade <paulmcquad@...il.com>
> ---
>  mm/ksm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/ksm.c b/mm/ksm.c
> index fb75902..79a26b4 100644
> --- a/mm/ksm.c
> +++ b/mm/ksm.c
> @@ -2310,7 +2310,7 @@ static int __init ksm_init(void)
>  
>  	ksm_thread = kthread_run(ksm_scan_thread, NULL, "ksmd");
>  	if (IS_ERR(ksm_thread)) {
> -		printk(KERN_ERR "ksm: creating kthread failed\n");
> +		pr_err(KERN_ERR "ksm: creating kthread failed\n");
>  		err = PTR_ERR(ksm_thread);
>  		goto out_free;
>  	}
> @@ -2318,7 +2318,7 @@ static int __init ksm_init(void)
>  #ifdef CONFIG_SYSFS
>  	err = sysfs_create_group(mm_kobj, &ksm_attr_group);
>  	if (err) {
> -		printk(KERN_ERR "ksm: register sysfs failed\n");
> +		pr_err(KERN_ERR "ksm: register sysfs failed\n");
>  		kthread_stop(ksm_thread);
>  		goto out_free;
>  	}

err,

--- a/mm/ksm.c~mm-ksm-use-pr_err-instead-of-printk-fix
+++ a/mm/ksm.c
@@ -2310,7 +2310,7 @@ static int __init ksm_init(void)
 
 	ksm_thread = kthread_run(ksm_scan_thread, NULL, "ksmd");
 	if (IS_ERR(ksm_thread)) {
-		pr_err(KERN_ERR "ksm: creating kthread failed\n");
+		pr_err("ksm: creating kthread failed\n");
 		err = PTR_ERR(ksm_thread);
 		goto out_free;
 	}
@@ -2318,7 +2318,7 @@ static int __init ksm_init(void)
 #ifdef CONFIG_SYSFS
 	err = sysfs_create_group(mm_kobj, &ksm_attr_group);
 	if (err) {
-		pr_err(KERN_ERR "ksm: register sysfs failed\n");
+		pr_err("ksm: register sysfs failed\n");
 		kthread_stop(ksm_thread);
 		goto out_free;
 	}


A quick grep indicates that we have the same mistake in tens of places.
checkpatch rule, please?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ