Re: [PATCH] Staging: android: fix pr_info and pr_err coding styleissues in ashmem.c

From: Joe Perches
Date: Fri Jun 29 2012 - 12:37:47 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/