提交 28b7deae 编写于 作者: F Fabian Frederick 提交者: David S. Miller

wimax: convert printk to pr_foo()

Use current logging functions and add module name prefix.
Signed-off-by: NFabian Frederick <fabf@skynet.be>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 505e907d
master alk-4.19.24 alk-4.19.30 alk-4.19.34 alk-4.19.36 alk-4.19.43 alk-4.19.48 alk-4.19.57 ck-4.19.67 ck-4.19.81 ck-4.19.91 github/fork/deepanshu1422/fix-typo-in-comment github/fork/haosdent/fix-typo linux-next v4.19.91 v4.19.90 v4.19.89 v4.19.88 v4.19.87 v4.19.86 v4.19.85 v4.19.84 v4.19.83 v4.19.82 v4.19.81 v4.19.80 v4.19.79 v4.19.78 v4.19.77 v4.19.76 v4.19.75 v4.19.74 v4.19.73 v4.19.72 v4.19.71 v4.19.70 v4.19.69 v4.19.68 v4.19.67 v4.19.66 v4.19.65 v4.19.64 v4.19.63 v4.19.62 v4.19.61 v4.19.60 v4.19.59 v4.19.58 v4.19.57 v4.19.56 v4.19.55 v4.19.54 v4.19.53 v4.19.52 v4.19.51 v4.19.50 v4.19.49 v4.19.48 v4.19.47 v4.19.46 v4.19.45 v4.19.44 v4.19.43 v4.19.42 v4.19.41 v4.19.40 v4.19.39 v4.19.38 v4.19.37 v4.19.36 v4.19.35 v4.19.34 v4.19.33 v4.19.32 v4.19.31 v4.19.30 v4.19.29 v4.19.28 v4.19.27 v4.19.26 v4.19.25 v4.19.24 v4.19.23 v4.19.22 v4.19.21 v4.19.20 v4.19.19 v4.19.18 v4.19.17 v4.19.16 v4.19.15 v4.19.14 v4.19.13 v4.19.12 v4.19.11 v4.19.10 v4.19.9 v4.19.8 v4.19.7 v4.19.6 v4.19.5 v4.19.4 v4.19.3 v4.19.2 v4.19.1 v4.19 v4.19-rc8 v4.19-rc7 v4.19-rc6 v4.19-rc5 v4.19-rc4 v4.19-rc3 v4.19-rc2 v4.19-rc1 ck-release-21 ck-release-20 ck-release-19.2 ck-release-19.1 ck-release-19 ck-release-18 ck-release-17.2 ck-release-17.1 ck-release-17 ck-release-16 ck-release-15.1 ck-release-15 ck-release-14 ck-release-13.2 ck-release-13 ck-release-12 ck-release-11 ck-release-10 ck-release-9 ck-release-7 alk-release-15 alk-release-14 alk-release-13.2 alk-release-13 alk-release-12 alk-release-11 alk-release-10 alk-release-9 alk-release-7
无相关合并请求
...@@ -137,7 +137,7 @@ void wimax_id_table_release(void) ...@@ -137,7 +137,7 @@ void wimax_id_table_release(void)
#endif #endif
spin_lock(&wimax_id_table_lock); spin_lock(&wimax_id_table_lock);
list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) { list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) {
printk(KERN_ERR "BUG: %s wimax_dev %p ifindex %d not cleared\n", pr_err("BUG: %s wimax_dev %p ifindex %d not cleared\n",
__func__, wimax_dev, wimax_dev->net_dev->ifindex); __func__, wimax_dev, wimax_dev->net_dev->ifindex);
WARN_ON(1); WARN_ON(1);
} }
......
...@@ -189,7 +189,7 @@ const void *wimax_msg_data_len(struct sk_buff *msg, size_t *size) ...@@ -189,7 +189,7 @@ const void *wimax_msg_data_len(struct sk_buff *msg, size_t *size)
nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
WIMAX_GNL_MSG_DATA); WIMAX_GNL_MSG_DATA);
if (nla == NULL) { if (nla == NULL) {
printk(KERN_ERR "Cannot find attribute WIMAX_GNL_MSG_DATA\n"); pr_err("Cannot find attribute WIMAX_GNL_MSG_DATA\n");
return NULL; return NULL;
} }
*size = nla_len(nla); *size = nla_len(nla);
...@@ -211,7 +211,7 @@ const void *wimax_msg_data(struct sk_buff *msg) ...@@ -211,7 +211,7 @@ const void *wimax_msg_data(struct sk_buff *msg)
nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
WIMAX_GNL_MSG_DATA); WIMAX_GNL_MSG_DATA);
if (nla == NULL) { if (nla == NULL) {
printk(KERN_ERR "Cannot find attribute WIMAX_GNL_MSG_DATA\n"); pr_err("Cannot find attribute WIMAX_GNL_MSG_DATA\n");
return NULL; return NULL;
} }
return nla_data(nla); return nla_data(nla);
...@@ -232,7 +232,7 @@ ssize_t wimax_msg_len(struct sk_buff *msg) ...@@ -232,7 +232,7 @@ ssize_t wimax_msg_len(struct sk_buff *msg)
nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
WIMAX_GNL_MSG_DATA); WIMAX_GNL_MSG_DATA);
if (nla == NULL) { if (nla == NULL) {
printk(KERN_ERR "Cannot find attribute WIMAX_GNL_MSG_DATA\n"); pr_err("Cannot find attribute WIMAX_GNL_MSG_DATA\n");
return -EINVAL; return -EINVAL;
} }
return nla_len(nla); return nla_len(nla);
...@@ -343,8 +343,7 @@ int wimax_gnl_doit_msg_from_user(struct sk_buff *skb, struct genl_info *info) ...@@ -343,8 +343,7 @@ int wimax_gnl_doit_msg_from_user(struct sk_buff *skb, struct genl_info *info)
d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
result = -ENODEV; result = -ENODEV;
if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) { if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) {
printk(KERN_ERR "WIMAX_GNL_MSG_FROM_USER: can't find IFIDX " pr_err("WIMAX_GNL_MSG_FROM_USER: can't find IFIDX attribute\n");
"attribute\n");
goto error_no_wimax_dev; goto error_no_wimax_dev;
} }
ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]); ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]);
......
...@@ -107,8 +107,7 @@ int wimax_gnl_doit_reset(struct sk_buff *skb, struct genl_info *info) ...@@ -107,8 +107,7 @@ int wimax_gnl_doit_reset(struct sk_buff *skb, struct genl_info *info)
d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
result = -ENODEV; result = -ENODEV;
if (info->attrs[WIMAX_GNL_RESET_IFIDX] == NULL) { if (info->attrs[WIMAX_GNL_RESET_IFIDX] == NULL) {
printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX " pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n");
"attribute\n");
goto error_no_wimax_dev; goto error_no_wimax_dev;
} }
ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]); ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]);
......
...@@ -421,8 +421,7 @@ int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info) ...@@ -421,8 +421,7 @@ int wimax_gnl_doit_rfkill(struct sk_buff *skb, struct genl_info *info)
d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
result = -ENODEV; result = -ENODEV;
if (info->attrs[WIMAX_GNL_RFKILL_IFIDX] == NULL) { if (info->attrs[WIMAX_GNL_RFKILL_IFIDX] == NULL) {
printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX " pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n");
"attribute\n");
goto error_no_wimax_dev; goto error_no_wimax_dev;
} }
ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]); ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]);
......
...@@ -49,8 +49,7 @@ int wimax_gnl_doit_state_get(struct sk_buff *skb, struct genl_info *info) ...@@ -49,8 +49,7 @@ int wimax_gnl_doit_state_get(struct sk_buff *skb, struct genl_info *info)
d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info);
result = -ENODEV; result = -ENODEV;
if (info->attrs[WIMAX_GNL_STGET_IFIDX] == NULL) { if (info->attrs[WIMAX_GNL_STGET_IFIDX] == NULL) {
printk(KERN_ERR "WIMAX_GNL_OP_STATE_GET: can't find IFIDX " pr_err("WIMAX_GNL_OP_STATE_GET: can't find IFIDX attribute\n");
"attribute\n");
goto error_no_wimax_dev; goto error_no_wimax_dev;
} }
ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]); ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]);
......
...@@ -191,8 +191,8 @@ void __check_new_state(enum wimax_st old_state, enum wimax_st new_state, ...@@ -191,8 +191,8 @@ void __check_new_state(enum wimax_st old_state, enum wimax_st new_state,
unsigned int allowed_states_bm) unsigned int allowed_states_bm)
{ {
if (WARN_ON(((1 << new_state) & allowed_states_bm) == 0)) { if (WARN_ON(((1 << new_state) & allowed_states_bm) == 0)) {
printk(KERN_ERR "SW BUG! Forbidden state change %u -> %u\n", pr_err("SW BUG! Forbidden state change %u -> %u\n",
old_state, new_state); old_state, new_state);
} }
} }
...@@ -602,8 +602,7 @@ int __init wimax_subsys_init(void) ...@@ -602,8 +602,7 @@ int __init wimax_subsys_init(void)
wimax_gnl_ops, wimax_gnl_ops,
wimax_gnl_mcgrps); wimax_gnl_mcgrps);
if (unlikely(result < 0)) { if (unlikely(result < 0)) {
printk(KERN_ERR "cannot register generic netlink family: %d\n", pr_err("cannot register generic netlink family: %d\n", result);
result);
goto error_register_family; goto error_register_family;
} }
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
#define __WIMAX_INTERNAL_H__ #define __WIMAX_INTERNAL_H__
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifdef pr_fmt
#undef pr_fmt
#endif
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/device.h> #include <linux/device.h>
#include <net/wimax.h> #include <net/wimax.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部