diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2014-03-27 09:10:55 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-07-10 12:35:05 -0400 |
commit | f88c5d90ccca70841af88ba9456ba4aac6d10da8 (patch) | |
tree | a5965801cc1fbdd97d797c7e9b3d9145275af19d /drivers/block | |
parent | 2f2abeae3cd139fb3581249388bf2018612a87e5 (diff) |
drbd: cosmetic: change all printk(level, ...) to pr_<level>(...)
Cosmetic change only.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_bitmap.c | 11 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 4 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 28 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 4 |
4 files changed, 23 insertions, 24 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index 424ebf6bdad0..dab6923493cb 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c | |||
@@ -22,6 +22,8 @@ | |||
22 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | 22 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
26 | |||
25 | #include <linux/bitops.h> | 27 | #include <linux/bitops.h> |
26 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
27 | #include <linux/string.h> | 29 | #include <linux/string.h> |
@@ -353,9 +355,8 @@ static void bm_free_pages(struct page **pages, unsigned long number) | |||
353 | 355 | ||
354 | for (i = 0; i < number; i++) { | 356 | for (i = 0; i < number; i++) { |
355 | if (!pages[i]) { | 357 | if (!pages[i]) { |
356 | printk(KERN_ALERT "drbd: bm_free_pages tried to free " | 358 | pr_alert("bm_free_pages tried to free a NULL pointer; i=%lu n=%lu\n", |
357 | "a NULL pointer; i=%lu n=%lu\n", | 359 | i, number); |
358 | i, number); | ||
359 | continue; | 360 | continue; |
360 | } | 361 | } |
361 | __free_page(pages[i]); | 362 | __free_page(pages[i]); |
@@ -592,7 +593,7 @@ static void bm_memset(struct drbd_bitmap *b, size_t offset, int c, size_t len) | |||
592 | end = offset + len; | 593 | end = offset + len; |
593 | 594 | ||
594 | if (end > b->bm_words) { | 595 | if (end > b->bm_words) { |
595 | printk(KERN_ALERT "drbd: bm_memset end > bm_words\n"); | 596 | pr_alert("bm_memset end > bm_words\n"); |
596 | return; | 597 | return; |
597 | } | 598 | } |
598 | 599 | ||
@@ -602,7 +603,7 @@ static void bm_memset(struct drbd_bitmap *b, size_t offset, int c, size_t len) | |||
602 | p_addr = bm_map_pidx(b, idx); | 603 | p_addr = bm_map_pidx(b, idx); |
603 | bm = p_addr + MLPP(offset); | 604 | bm = p_addr + MLPP(offset); |
604 | if (bm+do_now > p_addr + LWPP) { | 605 | if (bm+do_now > p_addr + LWPP) { |
605 | printk(KERN_ALERT "drbd: BUG BUG BUG! p_addr:%p bm:%p do_now:%d\n", | 606 | pr_alert("BUG BUG BUG! p_addr:%p bm:%p do_now:%d\n", |
606 | p_addr, bm, (int)do_now); | 607 | p_addr, bm, (int)do_now); |
607 | } else | 608 | } else |
608 | memset(bm, c, do_now * sizeof(long)); | 609 | memset(bm, c, do_now * sizeof(long)); |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index b0ab358c39e6..c88d6c6be70b 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -1467,9 +1467,7 @@ static inline void drbd_generic_make_request(struct drbd_device *device, | |||
1467 | { | 1467 | { |
1468 | __release(local); | 1468 | __release(local); |
1469 | if (!bio->bi_bdev) { | 1469 | if (!bio->bi_bdev) { |
1470 | printk(KERN_ERR "drbd%d: drbd_generic_make_request: " | 1470 | drbd_err(device, "drbd_generic_make_request: bio->bi_bdev == NULL\n"); |
1471 | "bio->bi_bdev == NULL\n", | ||
1472 | device_to_minor(device)); | ||
1473 | bio_endio(bio, -ENODEV); | 1471 | bio_endio(bio, -ENODEV); |
1474 | return; | 1472 | return; |
1475 | } | 1473 | } |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 7ada5d363064..686c5a59edeb 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -26,6 +26,8 @@ | |||
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
30 | |||
29 | #include <linux/module.h> | 31 | #include <linux/module.h> |
30 | #include <linux/drbd.h> | 32 | #include <linux/drbd.h> |
31 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
@@ -2333,7 +2335,7 @@ static void drbd_cleanup(void) | |||
2333 | 2335 | ||
2334 | idr_destroy(&drbd_devices); | 2336 | idr_destroy(&drbd_devices); |
2335 | 2337 | ||
2336 | printk(KERN_INFO "drbd: module cleanup done.\n"); | 2338 | pr_info("module cleanup done.\n"); |
2337 | } | 2339 | } |
2338 | 2340 | ||
2339 | /** | 2341 | /** |
@@ -2869,8 +2871,7 @@ static int __init drbd_init(void) | |||
2869 | int err; | 2871 | int err; |
2870 | 2872 | ||
2871 | if (minor_count < DRBD_MINOR_COUNT_MIN || minor_count > DRBD_MINOR_COUNT_MAX) { | 2873 | if (minor_count < DRBD_MINOR_COUNT_MIN || minor_count > DRBD_MINOR_COUNT_MAX) { |
2872 | printk(KERN_ERR | 2874 | pr_err("invalid minor_count (%d)\n", minor_count); |
2873 | "drbd: invalid minor_count (%d)\n", minor_count); | ||
2874 | #ifdef MODULE | 2875 | #ifdef MODULE |
2875 | return -EINVAL; | 2876 | return -EINVAL; |
2876 | #else | 2877 | #else |
@@ -2880,8 +2881,7 @@ static int __init drbd_init(void) | |||
2880 | 2881 | ||
2881 | err = register_blkdev(DRBD_MAJOR, "drbd"); | 2882 | err = register_blkdev(DRBD_MAJOR, "drbd"); |
2882 | if (err) { | 2883 | if (err) { |
2883 | printk(KERN_ERR | 2884 | pr_err("unable to register block device major %d\n", |
2884 | "drbd: unable to register block device major %d\n", | ||
2885 | DRBD_MAJOR); | 2885 | DRBD_MAJOR); |
2886 | return err; | 2886 | return err; |
2887 | } | 2887 | } |
@@ -2899,7 +2899,7 @@ static int __init drbd_init(void) | |||
2899 | 2899 | ||
2900 | err = drbd_genl_register(); | 2900 | err = drbd_genl_register(); |
2901 | if (err) { | 2901 | if (err) { |
2902 | printk(KERN_ERR "drbd: unable to register generic netlink family\n"); | 2902 | pr_err("unable to register generic netlink family\n"); |
2903 | goto fail; | 2903 | goto fail; |
2904 | } | 2904 | } |
2905 | 2905 | ||
@@ -2910,34 +2910,32 @@ static int __init drbd_init(void) | |||
2910 | err = -ENOMEM; | 2910 | err = -ENOMEM; |
2911 | drbd_proc = proc_create_data("drbd", S_IFREG | S_IRUGO , NULL, &drbd_proc_fops, NULL); | 2911 | drbd_proc = proc_create_data("drbd", S_IFREG | S_IRUGO , NULL, &drbd_proc_fops, NULL); |
2912 | if (!drbd_proc) { | 2912 | if (!drbd_proc) { |
2913 | printk(KERN_ERR "drbd: unable to register proc file\n"); | 2913 | pr_err("unable to register proc file\n"); |
2914 | goto fail; | 2914 | goto fail; |
2915 | } | 2915 | } |
2916 | 2916 | ||
2917 | retry.wq = create_singlethread_workqueue("drbd-reissue"); | 2917 | retry.wq = create_singlethread_workqueue("drbd-reissue"); |
2918 | if (!retry.wq) { | 2918 | if (!retry.wq) { |
2919 | printk(KERN_ERR "drbd: unable to create retry workqueue\n"); | 2919 | pr_err("unable to create retry workqueue\n"); |
2920 | goto fail; | 2920 | goto fail; |
2921 | } | 2921 | } |
2922 | INIT_WORK(&retry.worker, do_retry); | 2922 | INIT_WORK(&retry.worker, do_retry); |
2923 | spin_lock_init(&retry.lock); | 2923 | spin_lock_init(&retry.lock); |
2924 | INIT_LIST_HEAD(&retry.writes); | 2924 | INIT_LIST_HEAD(&retry.writes); |
2925 | 2925 | ||
2926 | printk(KERN_INFO "drbd: initialized. " | 2926 | pr_info("initialized. " |
2927 | "Version: " REL_VERSION " (api:%d/proto:%d-%d)\n", | 2927 | "Version: " REL_VERSION " (api:%d/proto:%d-%d)\n", |
2928 | API_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX); | 2928 | API_VERSION, PRO_VERSION_MIN, PRO_VERSION_MAX); |
2929 | printk(KERN_INFO "drbd: %s\n", drbd_buildtag()); | 2929 | pr_info("%s\n", drbd_buildtag()); |
2930 | printk(KERN_INFO "drbd: registered as block device major %d\n", | 2930 | pr_info("registered as block device major %d\n", DRBD_MAJOR); |
2931 | DRBD_MAJOR); | ||
2932 | |||
2933 | return 0; /* Success! */ | 2931 | return 0; /* Success! */ |
2934 | 2932 | ||
2935 | fail: | 2933 | fail: |
2936 | drbd_cleanup(); | 2934 | drbd_cleanup(); |
2937 | if (err == -ENOMEM) | 2935 | if (err == -ENOMEM) |
2938 | printk(KERN_ERR "drbd: ran out of memory\n"); | 2936 | pr_err("ran out of memory\n"); |
2939 | else | 2937 | else |
2940 | printk(KERN_ERR "drbd: initialization failure\n"); | 2938 | pr_err("initialization failure\n"); |
2941 | return err; | 2939 | return err; |
2942 | } | 2940 | } |
2943 | 2941 | ||
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 81949d65fad0..c2e047f89bcf 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -23,6 +23,8 @@ | |||
23 | 23 | ||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
27 | |||
26 | #include <linux/module.h> | 28 | #include <linux/module.h> |
27 | #include <linux/drbd.h> | 29 | #include <linux/drbd.h> |
28 | #include <linux/in.h> | 30 | #include <linux/in.h> |
@@ -85,7 +87,7 @@ static void drbd_adm_send_reply(struct sk_buff *skb, struct genl_info *info) | |||
85 | { | 87 | { |
86 | genlmsg_end(skb, genlmsg_data(nlmsg_data(nlmsg_hdr(skb)))); | 88 | genlmsg_end(skb, genlmsg_data(nlmsg_data(nlmsg_hdr(skb)))); |
87 | if (genlmsg_reply(skb, info)) | 89 | if (genlmsg_reply(skb, info)) |
88 | printk(KERN_ERR "drbd: error sending genl reply\n"); | 90 | pr_err("error sending genl reply\n"); |
89 | } | 91 | } |
90 | 92 | ||
91 | /* Used on a fresh "drbd_adm_prepare"d reply_skb, this cannot fail: The only | 93 | /* Used on a fresh "drbd_adm_prepare"d reply_skb, this cannot fail: The only |