Commit c810a399798022d545191e2daaca0368623c15d3
Committed by
Greg Kroah-Hartman
1 parent
2f0b9d082e
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
staging: Android: Fix some checkpatch warnings
Warnings reported by checkpatch.pl have been fixed. Cc: Brian Swetland <swetland@google.com> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 4 changed files with 20 additions and 12 deletions Side-by-side Diff
drivers/staging/android/ashmem.c
... | ... | @@ -16,6 +16,8 @@ |
16 | 16 | ** GNU General Public License for more details. |
17 | 17 | */ |
18 | 18 | |
19 | +#define pr_fmt(fmt) "ashmem: " fmt | |
20 | + | |
19 | 21 | #include <linux/module.h> |
20 | 22 | #include <linux/file.h> |
21 | 23 | #include <linux/fs.h> |
... | ... | @@ -707,7 +709,7 @@ |
707 | 709 | sizeof(struct ashmem_area), |
708 | 710 | 0, 0, NULL); |
709 | 711 | if (unlikely(!ashmem_area_cachep)) { |
710 | - printk(KERN_ERR "ashmem: failed to create slab cache\n"); | |
712 | + pr_err("failed to create slab cache\n"); | |
711 | 713 | return -ENOMEM; |
712 | 714 | } |
713 | 715 | |
714 | 716 | |
715 | 717 | |
... | ... | @@ -715,19 +717,19 @@ |
715 | 717 | sizeof(struct ashmem_range), |
716 | 718 | 0, 0, NULL); |
717 | 719 | if (unlikely(!ashmem_range_cachep)) { |
718 | - printk(KERN_ERR "ashmem: failed to create slab cache\n"); | |
720 | + pr_err("failed to create slab cache\n"); | |
719 | 721 | return -ENOMEM; |
720 | 722 | } |
721 | 723 | |
722 | 724 | ret = misc_register(&ashmem_misc); |
723 | 725 | if (unlikely(ret)) { |
724 | - printk(KERN_ERR "ashmem: failed to register misc device!\n"); | |
726 | + pr_err("failed to register misc device!\n"); | |
725 | 727 | return ret; |
726 | 728 | } |
727 | 729 | |
728 | 730 | register_shrinker(&ashmem_shrinker); |
729 | 731 | |
730 | - printk(KERN_INFO "ashmem: initialized\n"); | |
732 | + pr_info("initialized\n"); | |
731 | 733 | |
732 | 734 | return 0; |
733 | 735 | } |
734 | 736 | |
... | ... | @@ -740,12 +742,12 @@ |
740 | 742 | |
741 | 743 | ret = misc_deregister(&ashmem_misc); |
742 | 744 | if (unlikely(ret)) |
743 | - printk(KERN_ERR "ashmem: failed to unregister misc device!\n"); | |
745 | + pr_err("failed to unregister misc device!\n"); | |
744 | 746 | |
745 | 747 | kmem_cache_destroy(ashmem_range_cachep); |
746 | 748 | kmem_cache_destroy(ashmem_area_cachep); |
747 | 749 | |
748 | - printk(KERN_INFO "ashmem: unloaded\n"); | |
750 | + pr_info("unloaded\n"); | |
749 | 751 | } |
750 | 752 | |
751 | 753 | module_init(ashmem_init); |
drivers/staging/android/logger.c
... | ... | @@ -17,6 +17,8 @@ |
17 | 17 | * GNU General Public License for more details. |
18 | 18 | */ |
19 | 19 | |
20 | +#define pr_fmt(fmt) "logger: " fmt | |
21 | + | |
20 | 22 | #include <linux/sched.h> |
21 | 23 | #include <linux/module.h> |
22 | 24 | #include <linux/fs.h> |
23 | 25 | |
... | ... | @@ -621,13 +623,13 @@ |
621 | 623 | /* finally, initialize the misc device for this log */ |
622 | 624 | ret = misc_register(&log->misc); |
623 | 625 | if (unlikely(ret)) { |
624 | - printk(KERN_ERR "logger: failed to register misc " | |
625 | - "device for log '%s'!\n", log->misc.name); | |
626 | + pr_err("failed to register misc device for log '%s'!\n", | |
627 | + log->misc.name); | |
626 | 628 | goto out_free_log; |
627 | 629 | } |
628 | 630 | |
629 | - printk(KERN_INFO "logger: created %luK log '%s'\n", | |
630 | - (unsigned long) log->size >> 10, log->misc.name); | |
631 | + pr_info("created %luK log '%s'\n", | |
632 | + (unsigned long) log->size >> 10, log->misc.name); | |
631 | 633 | |
632 | 634 | return 0; |
633 | 635 |
drivers/staging/android/ram_console.c
... | ... | @@ -13,6 +13,8 @@ |
13 | 13 | * |
14 | 14 | */ |
15 | 15 | |
16 | +#define pr_fmt(fmt) "ram_console: " fmt | |
17 | + | |
16 | 18 | #include <linux/console.h> |
17 | 19 | #include <linux/init.h> |
18 | 20 | #include <linux/module.h> |
... | ... | @@ -162,7 +164,7 @@ |
162 | 164 | |
163 | 165 | entry = create_proc_entry("last_kmsg", S_IFREG | S_IRUGO, NULL); |
164 | 166 | if (!entry) { |
165 | - printk(KERN_ERR "ram_console: failed to create proc entry\n"); | |
167 | + pr_err("failed to create proc entry\n"); | |
166 | 168 | persistent_ram_free_old(prz); |
167 | 169 | return 0; |
168 | 170 | } |
drivers/staging/android/timed_output.c
... | ... | @@ -14,6 +14,8 @@ |
14 | 14 | * |
15 | 15 | */ |
16 | 16 | |
17 | +#define pr_fmt(fmt) "timed_output: " fmt | |
18 | + | |
17 | 19 | #include <linux/module.h> |
18 | 20 | #include <linux/types.h> |
19 | 21 | #include <linux/device.h> |
... | ... | @@ -90,7 +92,7 @@ |
90 | 92 | |
91 | 93 | err_create_file: |
92 | 94 | device_destroy(timed_output_class, MKDEV(0, tdev->index)); |
93 | - printk(KERN_ERR "timed_output: Failed to register driver %s\n", | |
95 | + pr_err("failed to register driver %s\n", | |
94 | 96 | tdev->name); |
95 | 97 | |
96 | 98 | return ret; |