From 85b7a9de00bde29e3c815474f51bfdf0fbcde9d7 Mon Sep 17 00:00:00 2001 From: Tina Johnson Date: Mon, 2 Mar 2015 23:40:25 +0530 Subject: [PATCH] staging: lustre: lustre: libcfs: Replaced printk() with pr_err() The following checkpatch warning was fixed: Prefer [subsystem eg: netdev]_err([subsystem]dev with the help of Coccinelle. The following semantic patch was used: @a@ expression e; @@ printk(e,...); @script:python b@ e << a.e; y; @@ import re match = re.match('KERN_ERR ', e); if (match == None): cocci.include_match(False) else: m = re.sub('KERN_ERR ', '', e) coccinelle.y = m; @c@ expression a.e; identifier b.y; @@ - printk(e, + pr_err(y, ...); Signed-off-by: Tina Johnson Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/libcfs/module.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c index 7dc77dd402b8..e35f5981cb43 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c @@ -347,7 +347,7 @@ static int init_libcfs_module(void) rc = libcfs_debug_init(5 * 1024 * 1024); if (rc < 0) { - printk(KERN_ERR "LustreError: libcfs_debug_init: %d\n", rc); + pr_err("LustreError: libcfs_debug_init: %d\n", rc); return rc; } @@ -433,8 +433,7 @@ static void exit_libcfs_module(void) rc = libcfs_debug_cleanup(); if (rc) - printk(KERN_ERR "LustreError: libcfs_debug_cleanup: %d\n", - rc); + pr_err("LustreError: libcfs_debug_cleanup: %d\n", rc); libcfs_arch_cleanup(); } -- 2.39.5