Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fabian Frederick and committed by
David S. Miller
28b7deae 505e907d

+17 -16
+1 -1
net/wimax/id-table.c
··· 137 137 #endif 138 138 spin_lock(&wimax_id_table_lock); 139 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 141 __func__, wimax_dev, wimax_dev->net_dev->ifindex); 142 142 WARN_ON(1); 143 143 }
+4 -5
net/wimax/op-msg.c
··· 189 189 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), 190 190 WIMAX_GNL_MSG_DATA); 191 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 193 return NULL; 194 194 } 195 195 *size = nla_len(nla); ··· 211 211 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), 212 212 WIMAX_GNL_MSG_DATA); 213 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 215 return NULL; 216 216 } 217 217 return nla_data(nla); ··· 232 232 nla = nlmsg_find_attr(nlh, sizeof(struct genlmsghdr), 233 233 WIMAX_GNL_MSG_DATA); 234 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 236 return -EINVAL; 237 237 } 238 238 return nla_len(nla); ··· 343 343 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 344 344 result = -ENODEV; 345 345 if (info->attrs[WIMAX_GNL_MSG_IFIDX] == NULL) { 346 - printk(KERN_ERR "WIMAX_GNL_MSG_FROM_USER: can't find IFIDX " 347 - "attribute\n"); 346 + pr_err("WIMAX_GNL_MSG_FROM_USER: can't find IFIDX attribute\n"); 348 347 goto error_no_wimax_dev; 349 348 } 350 349 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_MSG_IFIDX]);
+1 -2
net/wimax/op-reset.c
··· 107 107 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 108 108 result = -ENODEV; 109 109 if (info->attrs[WIMAX_GNL_RESET_IFIDX] == NULL) { 110 - printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX " 111 - "attribute\n"); 110 + pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n"); 112 111 goto error_no_wimax_dev; 113 112 } 114 113 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RESET_IFIDX]);
+1 -2
net/wimax/op-rfkill.c
··· 421 421 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 422 422 result = -ENODEV; 423 423 if (info->attrs[WIMAX_GNL_RFKILL_IFIDX] == NULL) { 424 - printk(KERN_ERR "WIMAX_GNL_OP_RFKILL: can't find IFIDX " 425 - "attribute\n"); 424 + pr_err("WIMAX_GNL_OP_RFKILL: can't find IFIDX attribute\n"); 426 425 goto error_no_wimax_dev; 427 426 } 428 427 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_RFKILL_IFIDX]);
+1 -2
net/wimax/op-state-get.c
··· 49 49 d_fnstart(3, NULL, "(skb %p info %p)\n", skb, info); 50 50 result = -ENODEV; 51 51 if (info->attrs[WIMAX_GNL_STGET_IFIDX] == NULL) { 52 - printk(KERN_ERR "WIMAX_GNL_OP_STATE_GET: can't find IFIDX " 53 - "attribute\n"); 52 + pr_err("WIMAX_GNL_OP_STATE_GET: can't find IFIDX attribute\n"); 54 53 goto error_no_wimax_dev; 55 54 } 56 55 ifindex = nla_get_u32(info->attrs[WIMAX_GNL_STGET_IFIDX]);
+3 -4
net/wimax/stack.c
··· 191 191 unsigned int allowed_states_bm) 192 192 { 193 193 if (WARN_ON(((1 << new_state) & allowed_states_bm) == 0)) { 194 - printk(KERN_ERR "SW BUG! Forbidden state change %u -> %u\n", 195 - old_state, new_state); 194 + pr_err("SW BUG! Forbidden state change %u -> %u\n", 195 + old_state, new_state); 196 196 } 197 197 } 198 198 ··· 602 602 wimax_gnl_ops, 603 603 wimax_gnl_mcgrps); 604 604 if (unlikely(result < 0)) { 605 - printk(KERN_ERR "cannot register generic netlink family: %d\n", 606 - result); 605 + pr_err("cannot register generic netlink family: %d\n", result); 607 606 goto error_register_family; 608 607 } 609 608
+6
net/wimax/wimax-internal.h
··· 30 30 #define __WIMAX_INTERNAL_H__ 31 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 39 #include <linux/device.h> 34 40 #include <net/wimax.h> 35 41