aboutsummaryrefslogtreecommitdiffstats
path: root/net/wimax
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-10-07 16:12:03 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-07 20:28:44 -0400
commit28b7deae75642c51f097391765fd39ff0dd6ce95 (patch)
tree944ac968107870b0c9b1cd1bd4747df0c531f362 /net/wimax
parent505e907db388185649d93925c9975d0a0704ea64 (diff)
wimax: convert printk to pr_foo()
Use current logging functions and add module name prefix. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wimax')
-rw-r--r--net/wimax/id-table.c2
-rw-r--r--net/wimax/op-msg.c9
-rw-r--r--net/wimax/op-reset.c3
-rw-r--r--net/wimax/op-rfkill.c3
-rw-r--r--net/wimax/op-state-get.c3
-rw-r--r--net/wimax/stack.c7
-rw-r--r--net/wimax/wimax-internal.h6
7 files changed, 17 insertions, 16 deletions
diff --git a/net/wimax/id-table.c b/net/wimax/id-table.c
index 72273abfcb16..a21508d11036 100644
--- a/net/wimax/id-table.c
+++ b/net/wimax/id-table.c
@@ -137,7 +137,7 @@ void wimax_id_table_release(void)
137#endif 137#endif
138 spin_lock(&wimax_id_table_lock); 138 spin_lock(&wimax_id_table_lock);
139 list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) { 139 list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) {
140 printk(KERN_ERR "BUG: %s wimax_dev %p ifindex %d not cleared\n", 140 pr_err("BUG: %s wimax_dev %p ifindex %d not cleared\n",
141 __func__, wimax_dev, wimax_dev->net_dev->ifindex); 141 __func__, wimax_dev, wimax_dev->net_dev->ifindex);
142 WARN_ON(1); 142 WARN_ON(1);
143 } 143 }
diff --git a/net/wimax/op-msg.c b/net/wimax/op-msg.c
index c278b3356f75..54aa146930bd 100644
--- a/net/wimax/op-msg.c
+++ b/net/wimax/op-msg.c
@@ -189,7 +189,7 @@ const void *wimax_msg_data_len(struct sk_buff *msg, size_t *size)
189 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), 189 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
190 WIMAX_GNL_MSG_DATA); 190 WIMAX_GNL_MSG_DATA);
191 if (nla == NULL) { 191 if (nla == NULL) {
192 printk(KERN_ERR "Cannot find attribute WIMAX_GNL_MSG_DATA\n"); 192 pr_err("Cannot find attribute WIMAX_GNL_MSG_DATA\n");
193 return NULL; 193 return NULL;
194 } 194 }
195 *size = nla_len(nla); 195 *size = nla_len(nla);
@@ -211,7 +211,7 @@ const void *wimax_msg_data(struct sk_buff *msg)
211 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), 211 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
212 WIMAX_GNL_MSG_DATA); 212 WIMAX_GNL_MSG_DATA);
213 if (nla == NULL) { 213 if (nla == NULL) {
214 printk(KERN_ERR "Cannot find attribute WIMAX_GNL_MSG_DATA\n"); 214 pr_err("Cannot find attribute WIMAX_GNL_MSG_DATA\n");
215 return NULL; 215 return NULL;
216 } 216 }
217 return nla_data(nla); 217 return nla_data(nla);
@@ -232,7 +232,7 @@ ssize_t wimax_msg_len(struct sk_buff *msg)
232 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), 232 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
233 WIMAX_GNL_MSG_DATA); 233 WIMAX_GNL_MSG_DATA);
234 if (nla == NULL) { 234 if (nla == NULL) {
235 printk(KERN_ERR "Cannot find attribute WIMAX_GNL_MSG_DATA\n"); 235 pr_err("Cannot find attribute WIMAX_GNL_MSG_DATA\n");
236 return -EINVAL; 236 return -EINVAL;
237 } 237 }
238 return nla_len(nla); 238 return nla_len(nla);
@@ -343,8 +343,7 @@ int wimax_gnl_doit_msg_from_user(struct sk_buff *skb, struct genl_info *info)
343 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 343 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
344 result = -ENODEV; 344 result = -ENODEV;
345 if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) { 345 if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) {
346 printk(KERN_ERR "WIMAX_GNL_MSG_FROM_USER: can't find IFIDX " 346 pr_err("WIMAX_GNL_MSG_FROM_USER: can't find IFIDX attribute\n");
347 "attribute\n");
348 goto error_no_wimax_dev; 347 goto error_no_wimax_dev;
349 } 348 }
350 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]); 349 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]);
diff --git a/net/wimax/op-reset.c b/net/wimax/op-reset.c
index eb4580784d9d..a42079165e1f 100644
--- a/net/wimax/op-reset.c
+++ b/net/wimax/op-reset.c
@@ -107,8 +107,7 @@ int wimax_gnl_doit_reset(struct sk_buff *skb, struct genl_info *info)
107 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 107 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
108 result = -ENODEV; 108 result = -ENODEV;
109 if (info->attrs[WIMAX_GNL_RESET_IFIDX] == NULL) { 109 if (info->attrs[WIMAX_GNL_RESET_IFIDX] == NULL) {
110 printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX " 110 pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n");
111 "attribute\n");
112 goto error_no_wimax_dev; 111 goto error_no_wimax_dev;
113 } 112 }
114 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]); 113 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]);
diff --git a/net/wimax/op-rfkill.c b/net/wimax/op-rfkill.c
index 403078d670a9..7d730543f243 100644
--- a/net/wimax/op-rfkill.c
+++ b/net/wimax/op-rfkill.c
@@ -421,8 +421,7 @@ int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info)
421 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 421 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
422 result = -ENODEV; 422 result = -ENODEV;
423 if (info->attrs[WIMAX_GNL_RFKILL_IFIDX] == NULL) { 423 if (info->attrs[WIMAX_GNL_RFKILL_IFIDX] == NULL) {
424 printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX " 424 pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n");
425 "attribute\n");
426 goto error_no_wimax_dev; 425 goto error_no_wimax_dev;
427 } 426 }
428 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]); 427 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]);
diff --git a/net/wimax/op-state-get.c b/net/wimax/op-state-get.c
index 995c08c827b5..e6788d281d0e 100644
--- a/net/wimax/op-state-get.c
+++ b/net/wimax/op-state-get.c
@@ -49,8 +49,7 @@ int wimax_gnl_doit_state_get(struct sk_buff *skb, struct genl_info *info)
49 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 49 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
50 result = -ENODEV; 50 result = -ENODEV;
51 if (info->attrs[WIMAX_GNL_STGET_IFIDX] == NULL) { 51 if (info->attrs[WIMAX_GNL_STGET_IFIDX] == NULL) {
52 printk(KERN_ERR "WIMAX_GNL_OP_STATE_GET: can't find IFIDX " 52 pr_err("WIMAX_GNL_OP_STATE_GET: can't find IFIDX attribute\n");
53 "attribute\n");
54 goto error_no_wimax_dev; 53 goto error_no_wimax_dev;
55 } 54 }
56 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]); 55 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]);
diff --git a/net/wimax/stack.c b/net/wimax/stack.c
index ec8b577db135..3f816e2971ee 100644
--- a/net/wimax/stack.c
+++ b/net/wimax/stack.c
@@ -191,8 +191,8 @@ void __check_new_state(enum wimax_st old_state, enum wimax_st new_state,
191 unsigned int allowed_states_bm) 191 unsigned int allowed_states_bm)
192{ 192{
193 if (WARN_ON(((1 << new_state) & allowed_states_bm) == 0)) { 193 if (WARN_ON(((1 << new_state) & allowed_states_bm) == 0)) {
194 printk(KERN_ERR "SW BUG! Forbidden state change %u -> %u\n", 194 pr_err("SW BUG! Forbidden state change %u -> %u\n",
195 old_state, new_state); 195 old_state, new_state);
196 } 196 }
197} 197}
198 198
@@ -602,8 +602,7 @@ int __init wimax_subsys_init(void)
602 wimax_gnl_ops, 602 wimax_gnl_ops,
603 wimax_gnl_mcgrps); 603 wimax_gnl_mcgrps);
604 if (unlikely(result < 0)) { 604 if (unlikely(result < 0)) {
605 printk(KERN_ERR "cannot register generic netlink family: %d\n", 605 pr_err("cannot register generic netlink family: %d\n", result);
606 result);
607 goto error_register_family; 606 goto error_register_family;
608 } 607 }
609 608
diff --git a/net/wimax/wimax-internal.h b/net/wimax/wimax-internal.h
index b445b82020a8..733c4bf8d4b3 100644
--- a/net/wimax/wimax-internal.h
+++ b/net/wimax/wimax-internal.h
@@ -30,6 +30,12 @@
30#define __WIMAX_INTERNAL_H__ 30#define __WIMAX_INTERNAL_H__
31#ifdef __KERNEL__ 31#ifdef __KERNEL__
32 32
33#ifdef pr_fmt
34#undef pr_fmt
35#endif
36
37#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
38
33#include <linux/device.h> 39#include <linux/device.h>
34#include <net/wimax.h> 40#include <net/wimax.h>
35 41