diff options
Diffstat (limited to 'drivers/xen/xenbus/xenbus_xs.c')
-rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index 88e677b0de74..b6d5fff43d16 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c | |||
@@ -31,6 +31,8 @@ | |||
31 | * IN THE SOFTWARE. | 31 | * IN THE SOFTWARE. |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
35 | |||
34 | #include <linux/unistd.h> | 36 | #include <linux/unistd.h> |
35 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
36 | #include <linux/types.h> | 38 | #include <linux/types.h> |
@@ -129,9 +131,8 @@ static int get_error(const char *errorstring) | |||
129 | 131 | ||
130 | for (i = 0; strcmp(errorstring, xsd_errors[i].errstring) != 0; i++) { | 132 | for (i = 0; strcmp(errorstring, xsd_errors[i].errstring) != 0; i++) { |
131 | if (i == ARRAY_SIZE(xsd_errors) - 1) { | 133 | if (i == ARRAY_SIZE(xsd_errors) - 1) { |
132 | printk(KERN_WARNING | 134 | pr_warn("xen store gave: unknown error %s\n", |
133 | "XENBUS xen store gave: unknown error %s", | 135 | errorstring); |
134 | errorstring); | ||
135 | return EINVAL; | 136 | return EINVAL; |
136 | } | 137 | } |
137 | } | 138 | } |
@@ -272,10 +273,8 @@ static void *xs_talkv(struct xenbus_transaction t, | |||
272 | } | 273 | } |
273 | 274 | ||
274 | if (msg.type != type) { | 275 | if (msg.type != type) { |
275 | if (printk_ratelimit()) | 276 | pr_warn_ratelimited("unexpected type [%d], expected [%d]\n", |
276 | printk(KERN_WARNING | 277 | msg.type, type); |
277 | "XENBUS unexpected type [%d], expected [%d]\n", | ||
278 | msg.type, type); | ||
279 | kfree(ret); | 278 | kfree(ret); |
280 | return ERR_PTR(-EINVAL); | 279 | return ERR_PTR(-EINVAL); |
281 | } | 280 | } |
@@ -655,7 +654,7 @@ static void xs_reset_watches(void) | |||
655 | 654 | ||
656 | err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL)); | 655 | err = xs_error(xs_single(XBT_NIL, XS_RESET_WATCHES, "", NULL)); |
657 | if (err && err != -EEXIST) | 656 | if (err && err != -EEXIST) |
658 | printk(KERN_WARNING "xs_reset_watches failed: %d\n", err); | 657 | pr_warn("xs_reset_watches failed: %d\n", err); |
659 | } | 658 | } |
660 | 659 | ||
661 | /* Register callback to watch this node. */ | 660 | /* Register callback to watch this node. */ |
@@ -705,9 +704,7 @@ void unregister_xenbus_watch(struct xenbus_watch *watch) | |||
705 | 704 | ||
706 | err = xs_unwatch(watch->node, token); | 705 | err = xs_unwatch(watch->node, token); |
707 | if (err) | 706 | if (err) |
708 | printk(KERN_WARNING | 707 | pr_warn("Failed to release watch %s: %i\n", watch->node, err); |
709 | "XENBUS Failed to release watch %s: %i\n", | ||
710 | watch->node, err); | ||
711 | 708 | ||
712 | up_read(&xs_state.watch_mutex); | 709 | up_read(&xs_state.watch_mutex); |
713 | 710 | ||
@@ -901,8 +898,7 @@ static int xenbus_thread(void *unused) | |||
901 | for (;;) { | 898 | for (;;) { |
902 | err = process_msg(); | 899 | err = process_msg(); |
903 | if (err) | 900 | if (err) |
904 | printk(KERN_WARNING "XENBUS error %d while reading " | 901 | pr_warn("error %d while reading message\n", err); |
905 | "message\n", err); | ||
906 | if (kthread_should_stop()) | 902 | if (kthread_should_stop()) |
907 | break; | 903 | break; |
908 | } | 904 | } |