[PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c

Joe Perches joe at perches.com
Fri Jun 29 16:37:52 UTC 2012


On Fri, 2012-06-29 at 18:27 +0200, Pablo Vazquez Rodriguez wrote:
> 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
[]
> diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
[]
> @@ -707,7 +707,7 @@ static int __init ashmem_init(void)

Try adding
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
before any other #include

>  					  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");

these then become
		pr_err("failed to create slab cache\n");

> @@ -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");
[]
> +		pr_err("ashmem: failed to register misc device!\n");
		pr_err("failed ...");

etc.





More information about the devel mailing list