Staging: android: fix pr_info and pr_err coding style issues in ashmem.c
PATCH 1/1 Staging: android: fix pr_info and pr_err coding style issues in ashmem.c
This is a patch to the ashmem.c file that fixes up several pr_info and pr_err warnings found by the checkpath.pl tool
--- drivers/staging/android/ashmem.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/android/ashmem.c +6 -6
@@ -707,7 +707,7 @@ static int __init ashmem_init(void)sizeof (struct ashmem_area ), 0, 0, NULL);if (unlikely (!ashmem_area_cachep)) { -printk (KERN_ERR "ashmem: failed to create slab cache\n" ); +pr_err ("ashmem: failed to create slab cache\n" );return -ENOMEM ; }
@@ -715,19 +715,19 @@ static int __init ashmem_init(void)sizeof (struct ashmem_range ), 0, 0, NULL);if (unlikely (!ashmem_range_cachep)) { -printk (KERN_ERR "ashmem: failed to create slab cache\n" ); +pr_err ("ashmem: failed to create slab cache\n" );return -ENOMEM ; } ret =misc_register (&ashmem_misc);if (unlikely (ret)) { -printk (KERN_ERR "ashmem: failed to register misc device!\n" ); +pr_err ("ashmem: failed to register misc device!\n" );return ret; }register_shrinker (&ashmem_shrinker); -printk (KERN_INFO "ashmem: initialized\n" ); +pr_info ("ashmem: initialized\n" );return 0 ; }
@@ -740,12 +740,12 @@ static void __exit ashmem_exit(void) ret =misc_deregister (&ashmem_misc);if (unlikely (ret)) -printk (KERN_ERR "ashmem: failed to unregister misc device!\n" ); +pr_err ("ashmem: failed to unregister misc device!\n" );kmem_cache_destroy (ashmem_range_cachep);kmem_cache_destroy (ashmem_area_cachep); -printk (KERN_INFO "ashmem: unloaded\n" ); +pr_info ("ashmem: unloaded\n" ); }module_init (ashmem_init);
Signature · 1 line
1.7.7.6
Quoted 1 line · Pablo Vazquez Rodriguez
This is a patch to the
ashmem.cfile that fixes up severalpr_infoandpr_errwarnings found by the checkpath.pl tool
[]
drivers/staging/android/ashmem.c
Quoted 1 line
drivers/staging/android/ashmem.c +0
-0
[]
drivers/staging/android/ashmem.c static int __init ashmem_init(void)
Quoted 1 line
drivers/staging/android/ashmem.c +0
-0@@ -707,7 +707,7 @@ static int __init ashmem_init(void)
Try adding
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any other #include
drivers/staging/android/ashmem.c static int __init ashmem_init(void) · line 710
Quoted 5 lines
drivers/staging/android/ashmem.c +1
-1sizeof (struct ashmem_area ), 0, 0, NULL);if (unlikely (!ashmem_area_cachep)) { -printk (KERN_ERR "ashmem: failed to create slab cache\n" ); +pr_err ("ashmem: failed to create slab cache\n" );
these then become
pr_err("failed to create slab cache\n");drivers/staging/android/ashmem.c static int __init ashmem_init(void) · line 715
Quoted 2 lines
drivers/staging/android/ashmem.c +1
-0@@ -715,19 +715,19 @@ static int __init ashmem_init(void) +pr_err ("ashmem: failed to create slab cache\n" );
pr_err("failed to create slab cache\n");[]
drivers/staging/android/ashmem.c static int __init ashmem_init(void) · line 724
Quoted 1 line
drivers/staging/android/ashmem.c +1
-0+pr_err ("ashmem: failed to register misc device!\n" );
pr_err("failed ...");etc.
Quoted 1 line · Pablo Vázquez
Ok, added the #define
pr_fmt(fmt)...
You sent this in HTML format, makeing it impossible to apply :(
Care to try it again?
thanks,
greg k-h