wimax: convert printk to pr_foo()
authorFabian Frederick <fabf@skynet.be>
Tue, 7 Oct 2014 20:12:03 +0000 (22:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Oct 2014 00:28:44 +0000 (20:28 -0400)
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>
net/wimax/id-table.c
net/wimax/op-msg.c
net/wimax/op-reset.c
net/wimax/op-rfkill.c
net/wimax/op-state-get.c
net/wimax/stack.c
net/wimax/wimax-internal.h

index 72273abfcb16beab16d4eff6b43457df3f802ec3..a21508d11036681c2ec069c16a24314d52f52fe0 100644 (file)
@@ -137,7 +137,7 @@ void wimax_id_table_release(void)
 #endif
        spin_lock(&wimax_id_table_lock);
        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);
                WARN_ON(1);
        }
index c278b3356f75fe2de50b99b9e7e71609eb25a8df..54aa146930bd819a45ce3520484326553d37ad16 100644 (file)
@@ -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),
                              WIMAX_GNL_MSG_DATA);
        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;
        }
        *size = nla_len(nla);
@@ -211,7 +211,7 @@ const void *wimax_msg_data(struct sk_buff *msg)
        nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
                              WIMAX_GNL_MSG_DATA);
        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 nla_data(nla);
@@ -232,7 +232,7 @@ ssize_t wimax_msg_len(struct sk_buff *msg)
        nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr),
                              WIMAX_GNL_MSG_DATA);
        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 nla_len(nla);
@@ -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);
        result = -ENODEV;
        if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) {
-               printk(KERN_ERR "WIMAX_GNL_MSG_FROM_USER: can't find IFIDX "
-                      "attribute\n");
+               pr_err("WIMAX_GNL_MSG_FROM_USER: can't find IFIDX attribute\n");
                goto error_no_wimax_dev;
        }
        ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]);
index eb4580784d9dc5abdcaf5be27b24578ed6b0ca0e..a42079165e1f974a28897c9224190d17e4bf854e 100644 (file)
@@ -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);
        result = -ENODEV;
        if (info->attrs[WIMAX_GNL_RESET_IFIDX] == NULL) {
-               printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX "
-                       "attribute\n");
+               pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n");
                goto error_no_wimax_dev;
        }
        ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]);
index 403078d670a909cb20b4660e1a33965fd996bb52..7d730543f24304dd64b7c9d1d855a6469c8727d8 100644 (file)
@@ -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);
        result = -ENODEV;
        if (info->attrs[WIMAX_GNL_RFKILL_IFIDX] == NULL) {
-               printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX "
-                       "attribute\n");
+               pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n");
                goto error_no_wimax_dev;
        }
        ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]);
index 995c08c827b512bf4a9e6650f77ac834015e60fe..e6788d281d0ef4a1a7ca83e3e4be2fcff33d7d3f 100644 (file)
@@ -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);
        result = -ENODEV;
        if (info->attrs[WIMAX_GNL_STGET_IFIDX] == NULL) {
-               printk(KERN_ERR "WIMAX_GNL_OP_STATE_GET: can't find IFIDX "
-                       "attribute\n");
+               pr_err("WIMAX_GNL_OP_STATE_GET: can't find IFIDX attribute\n");
                goto error_no_wimax_dev;
        }
        ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]);
index ec8b577db1354a6e6c33e631a3223f1fb5af7ccf..3f816e2971ee26d97bfb4cd12976d6f67980fce6 100644 (file)
@@ -191,8 +191,8 @@ void __check_new_state(enum wimax_st old_state, enum wimax_st new_state,
                       unsigned int allowed_states_bm)
 {
        if (WARN_ON(((1 << new_state) & allowed_states_bm) == 0)) {
-               printk(KERN_ERR "SW BUG! Forbidden state change %u -> %u\n",
-                       old_state, new_state);
+               pr_err("SW BUG! Forbidden state change %u -> %u\n",
+                      old_state, new_state);
        }
 }
 
@@ -602,8 +602,7 @@ int __init wimax_subsys_init(void)
                                                      wimax_gnl_ops,
                                                      wimax_gnl_mcgrps);
        if (unlikely(result < 0)) {
-               printk(KERN_ERR "cannot register generic netlink family: %d\n",
-                      result);
+               pr_err("cannot register generic netlink family: %d\n", result);
                goto error_register_family;
        }
 
index b445b82020a83143aee4e9e89815dc921fdb4759..733c4bf8d4b3fe8ad50b33fec033126baa1017cc 100644 (file)
 #define __WIMAX_INTERNAL_H__
 #ifdef __KERNEL__
 
+#ifdef pr_fmt
+#undef pr_fmt
+#endif
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
 #include <linux/device.h>
 #include <net/wimax.h>