* [PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c
@ 2012-06-29 16:27 Pablo Vazquez Rodriguez
2012-06-29 16:37 ` Joe Perches
[not found] ` <CAJ6TP82bM4d+pAc-+w_Y934FgBz5sQoyHm118s39GH5tf3TkJA@mail.gmail.com>
0 siblings, 2 replies; 4+ messages in thread
From: Pablo Vazquez Rodriguez @ 2012-06-29 16:27 UTC (permalink / raw)
To: greg
Cc: swetland, john.stultz, arve, ccross, bringert, devel,
linux-kernel, Pablo Vazquez Rodriguez
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
Signed-off-by: Pablo Vazquez Rodriguez <peibolvigo@gmail.com>
---
drivers/staging/android/ashmem.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index e84dbec..01e61c9 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -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);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c
2012-06-29 16:27 [PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c Pablo Vazquez Rodriguez
@ 2012-06-29 16:37 ` Joe Perches
[not found] ` <CAJ6TP82bM4d+pAc-+w_Y934FgBz5sQoyHm118s39GH5tf3TkJA@mail.gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2012-06-29 16:37 UTC (permalink / raw)
To: Pablo Vazquez Rodriguez
Cc: greg, swetland, john.stultz, arve, ccross, bringert, devel,
linux-kernel
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c
[not found] ` <CAJ6TP82bM4d+pAc-+w_Y934FgBz5sQoyHm118s39GH5tf3TkJA@mail.gmail.com>
@ 2012-07-06 23:16 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2012-07-06 23:16 UTC (permalink / raw)
To: Pablo Vázquez
Cc: swetland, john.stultz, arve, ccross, bringert, devel,
linux-kernel
On Fri, Jun 29, 2012 at 07:48:45PM +0200, Pablo Vázquez wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c
@ 2012-07-07 1:06 Pablo Vazquez Rodriguez
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Vazquez Rodriguez @ 2012-07-07 1:06 UTC (permalink / raw)
To: greg
Cc: swetland, john.stultz, arve, ccross, bringert, devel,
linux-kernel, peibolvigo
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
Signed-off-by: Pablo Vazquez Rodriguez <peibolvigo@gmail.com>
---
drivers/staging/android/ashmem.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index e84dbec..71eb63b 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -15,6 +15,7 @@
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/file.h>
@@ -707,7 +708,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("failed to create slab cache\n");
return -ENOMEM;
}
@@ -715,19 +716,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("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("failed to register misc device!\n");
return ret;
}
register_shrinker(&ashmem_shrinker);
- printk(KERN_INFO "ashmem: initialized\n");
+ pr_info("initialized\n");
return 0;
}
@@ -740,12 +741,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("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("unloaded\n");
}
module_init(ashmem_init);
--
1.7.7.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-07 1:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-29 16:27 [PATCH] Staging: android: fix pr_info and pr_err coding style issues in ashmem.c Pablo Vazquez Rodriguez
2012-06-29 16:37 ` Joe Perches
[not found] ` <CAJ6TP82bM4d+pAc-+w_Y934FgBz5sQoyHm118s39GH5tf3TkJA@mail.gmail.com>
2012-07-06 23:16 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2012-07-07 1:06 Pablo Vazquez Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox