aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwangweidong <wangweidong1@huawei.com>2013-12-06 06:24:33 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-09 20:24:18 -0500
commitb73e9e3cf06ef8180c75a6bd28cdd1b833d22a3a (patch)
tree8823cc5b0cf471c9e139d9b260f4ad651e50cef8 /net
parentd346a3fae3ff1d99f5d0c819bf86edf9094a26a1 (diff)
x25: convert printks to pr_<level>
use pr_<level> instead of printk(LEVEL) Suggested-by: Joe Perches <joe@perches.com> Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/x25/af_x25.c4
-rw-r--r--net/x25/x25_dev.c10
-rw-r--r--net/x25/x25_facilities.c14
-rw-r--r--net/x25/x25_forward.c5
-rw-r--r--net/x25/x25_in.c4
-rw-r--r--net/x25/x25_link.c6
-rw-r--r--net/x25/x25_subr.c6
7 files changed, 32 insertions, 17 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 7622789d3750..c8a8297cd4b8 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -35,6 +35,8 @@
35 * response 35 * response
36 */ 36 */
37 37
38#define pr_fmt(fmt) "X25: " fmt
39
38#include <linux/module.h> 40#include <linux/module.h>
39#include <linux/capability.h> 41#include <linux/capability.h>
40#include <linux/errno.h> 42#include <linux/errno.h>
@@ -1809,7 +1811,7 @@ static int __init x25_init(void)
1809 if (rc != 0) 1811 if (rc != 0)
1810 goto out_sock; 1812 goto out_sock;
1811 1813
1812 printk(KERN_INFO "X.25 for Linux Version 0.2\n"); 1814 pr_info("Linux Version 0.2\n");
1813 1815
1814 x25_register_sysctl(); 1816 x25_register_sysctl();
1815 rc = x25_proc_init(); 1817 rc = x25_proc_init();
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index a8a236338e61..39231237e1c3 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -17,6 +17,8 @@
17 * 2000-09-04 Henner Eisen Prevent freeing a dangling skb. 17 * 2000-09-04 Henner Eisen Prevent freeing a dangling skb.
18 */ 18 */
19 19
20#define pr_fmt(fmt) "X25: " fmt
21
20#include <linux/kernel.h> 22#include <linux/kernel.h>
21#include <linux/netdevice.h> 23#include <linux/netdevice.h>
22#include <linux/skbuff.h> 24#include <linux/skbuff.h>
@@ -89,7 +91,7 @@ static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
89*/ 91*/
90 92
91 if (frametype != X25_CLEAR_CONFIRMATION) 93 if (frametype != X25_CLEAR_CONFIRMATION)
92 printk(KERN_DEBUG "x25_receive_data(): unknown frame type %2x\n",frametype); 94 pr_debug("x25_receive_data(): unknown frame type %2x\n",frametype);
93 95
94 return 0; 96 return 0;
95} 97}
@@ -114,7 +116,7 @@ int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev,
114 */ 116 */
115 nb = x25_get_neigh(dev); 117 nb = x25_get_neigh(dev);
116 if (!nb) { 118 if (!nb) {
117 printk(KERN_DEBUG "X.25: unknown neighbour - %s\n", dev->name); 119 pr_debug("unknown neighbour - %s\n", dev->name);
118 goto drop; 120 goto drop;
119 } 121 }
120 122
@@ -154,7 +156,7 @@ void x25_establish_link(struct x25_neigh *nb)
154 switch (nb->dev->type) { 156 switch (nb->dev->type) {
155 case ARPHRD_X25: 157 case ARPHRD_X25:
156 if ((skb = alloc_skb(1, GFP_ATOMIC)) == NULL) { 158 if ((skb = alloc_skb(1, GFP_ATOMIC)) == NULL) {
157 printk(KERN_ERR "x25_dev: out of memory\n"); 159 pr_err("x25_dev: out of memory\n");
158 return; 160 return;
159 } 161 }
160 ptr = skb_put(skb, 1); 162 ptr = skb_put(skb, 1);
@@ -189,7 +191,7 @@ void x25_terminate_link(struct x25_neigh *nb)
189 191
190 skb = alloc_skb(1, GFP_ATOMIC); 192 skb = alloc_skb(1, GFP_ATOMIC);
191 if (!skb) { 193 if (!skb) {
192 printk(KERN_ERR "x25_dev: out of memory\n"); 194 pr_err("x25_dev: out of memory\n");
193 return; 195 return;
194 } 196 }
195 197
diff --git a/net/x25/x25_facilities.c b/net/x25/x25_facilities.c
index b8253250d723..7ecd04c21360 100644
--- a/net/x25/x25_facilities.c
+++ b/net/x25/x25_facilities.c
@@ -21,6 +21,8 @@
21 * on response. 21 * on response.
22 */ 22 */
23 23
24#define pr_fmt(fmt) "X25: " fmt
25
24#include <linux/kernel.h> 26#include <linux/kernel.h>
25#include <linux/string.h> 27#include <linux/string.h>
26#include <linux/skbuff.h> 28#include <linux/skbuff.h>
@@ -109,7 +111,7 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities,
109 case X25_MARKER: 111 case X25_MARKER:
110 break; 112 break;
111 default: 113 default:
112 printk(KERN_DEBUG "X.25: unknown facility " 114 pr_debug("unknown facility "
113 "%02X, value %02X\n", 115 "%02X, value %02X\n",
114 p[0], p[1]); 116 p[0], p[1]);
115 break; 117 break;
@@ -132,7 +134,7 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities,
132 *vc_fac_mask |= X25_MASK_WINDOW_SIZE; 134 *vc_fac_mask |= X25_MASK_WINDOW_SIZE;
133 break; 135 break;
134 default: 136 default:
135 printk(KERN_DEBUG "X.25: unknown facility " 137 pr_debug("unknown facility "
136 "%02X, values %02X, %02X\n", 138 "%02X, values %02X, %02X\n",
137 p[0], p[1], p[2]); 139 p[0], p[1], p[2]);
138 break; 140 break;
@@ -143,7 +145,7 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities,
143 case X25_FAC_CLASS_C: 145 case X25_FAC_CLASS_C:
144 if (len < 4) 146 if (len < 4)
145 return -1; 147 return -1;
146 printk(KERN_DEBUG "X.25: unknown facility %02X, " 148 pr_debug("unknown facility %02X, "
147 "values %02X, %02X, %02X\n", 149 "values %02X, %02X, %02X\n",
148 p[0], p[1], p[2], p[3]); 150 p[0], p[1], p[2], p[3]);
149 p += 4; 151 p += 4;
@@ -172,7 +174,7 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities,
172 *vc_fac_mask |= X25_MASK_CALLED_AE; 174 *vc_fac_mask |= X25_MASK_CALLED_AE;
173 break; 175 break;
174 default: 176 default:
175 printk(KERN_DEBUG "X.25: unknown facility %02X," 177 pr_debug("unknown facility %02X,"
176 "length %d\n", p[0], p[1]); 178 "length %d\n", p[0], p[1]);
177 break; 179 break;
178 } 180 }
@@ -341,12 +343,12 @@ void x25_limit_facilities(struct x25_facilities *facilities,
341 343
342 if (!nb->extended) { 344 if (!nb->extended) {
343 if (facilities->winsize_in > 7) { 345 if (facilities->winsize_in > 7) {
344 printk(KERN_DEBUG "X.25: incoming winsize limited to 7\n"); 346 pr_debug("incoming winsize limited to 7\n");
345 facilities->winsize_in = 7; 347 facilities->winsize_in = 7;
346 } 348 }
347 if (facilities->winsize_out > 7) { 349 if (facilities->winsize_out > 7) {
348 facilities->winsize_out = 7; 350 facilities->winsize_out = 7;
349 printk( KERN_DEBUG "X.25: outgoing winsize limited to 7\n"); 351 pr_debug("outgoing winsize limited to 7\n");
350 } 352 }
351 } 353 }
352} 354}
diff --git a/net/x25/x25_forward.c b/net/x25/x25_forward.c
index c541b622ae16..cf561f1613e1 100644
--- a/net/x25/x25_forward.c
+++ b/net/x25/x25_forward.c
@@ -8,6 +8,9 @@
8 * History 8 * History
9 * 03-01-2007 Added forwarding for x.25 Andrew Hendry 9 * 03-01-2007 Added forwarding for x.25 Andrew Hendry
10 */ 10 */
11
12#define pr_fmt(fmt) "X25: " fmt
13
11#include <linux/if_arp.h> 14#include <linux/if_arp.h>
12#include <linux/init.h> 15#include <linux/init.h>
13#include <linux/slab.h> 16#include <linux/slab.h>
@@ -51,7 +54,7 @@ int x25_forward_call(struct x25_address *dest_addr, struct x25_neigh *from,
51 list_for_each(entry, &x25_forward_list) { 54 list_for_each(entry, &x25_forward_list) {
52 x25_frwd = list_entry(entry, struct x25_forward, node); 55 x25_frwd = list_entry(entry, struct x25_forward, node);
53 if (x25_frwd->lci == lci) { 56 if (x25_frwd->lci == lci) {
54 printk(KERN_WARNING "X.25: call request for lci which is already registered!, transmitting but not registering new pair\n"); 57 pr_warn("call request for lci which is already registered!, transmitting but not registering new pair\n");
55 same_lci = 1; 58 same_lci = 1;
56 } 59 }
57 } 60 }
diff --git a/net/x25/x25_in.c b/net/x25/x25_in.c
index a49cd4ec551a..d1b0dc79bb6f 100644
--- a/net/x25/x25_in.c
+++ b/net/x25/x25_in.c
@@ -23,6 +23,8 @@
23 * i-frames. 23 * i-frames.
24 */ 24 */
25 25
26#define pr_fmt(fmt) "X25: " fmt
27
26#include <linux/slab.h> 28#include <linux/slab.h>
27#include <linux/errno.h> 29#include <linux/errno.h>
28#include <linux/kernel.h> 30#include <linux/kernel.h>
@@ -317,7 +319,7 @@ static int x25_state3_machine(struct sock *sk, struct sk_buff *skb, int frametyp
317 break; 319 break;
318 320
319 default: 321 default:
320 printk(KERN_WARNING "x25: unknown %02X in state 3\n", frametype); 322 pr_warn("unknown %02X in state 3\n", frametype);
321 break; 323 break;
322 } 324 }
323 325
diff --git a/net/x25/x25_link.c b/net/x25/x25_link.c
index 4acacf3c6617..fd5ffb25873f 100644
--- a/net/x25/x25_link.c
+++ b/net/x25/x25_link.c
@@ -21,6 +21,8 @@
21 * 2000-09-04 Henner Eisen dev_hold() / dev_put() for x25_neigh. 21 * 2000-09-04 Henner Eisen dev_hold() / dev_put() for x25_neigh.
22 */ 22 */
23 23
24#define pr_fmt(fmt) "X25: " fmt
25
24#include <linux/kernel.h> 26#include <linux/kernel.h>
25#include <linux/jiffies.h> 27#include <linux/jiffies.h>
26#include <linux/timer.h> 28#include <linux/timer.h>
@@ -93,13 +95,13 @@ void x25_link_control(struct sk_buff *skb, struct x25_neigh *nb,
93 if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 4)) 95 if (!pskb_may_pull(skb, X25_STD_MIN_LEN + 4))
94 break; 96 break;
95 97
96 printk(KERN_WARNING "x25: diagnostic #%d - %02X %02X %02X\n", 98 pr_warn("diagnostic #%d - %02X %02X %02X\n",
97 skb->data[3], skb->data[4], 99 skb->data[3], skb->data[4],
98 skb->data[5], skb->data[6]); 100 skb->data[5], skb->data[6]);
99 break; 101 break;
100 102
101 default: 103 default:
102 printk(KERN_WARNING "x25: received unknown %02X with LCI 000\n", 104 pr_warn("received unknown %02X with LCI 000\n",
103 frametype); 105 frametype);
104 break; 106 break;
105 } 107 }
diff --git a/net/x25/x25_subr.c b/net/x25/x25_subr.c
index 5170d52bfd96..6b5af65f491f 100644
--- a/net/x25/x25_subr.c
+++ b/net/x25/x25_subr.c
@@ -23,6 +23,8 @@
23 * restriction on response. 23 * restriction on response.
24 */ 24 */
25 25
26#define pr_fmt(fmt) "X25: " fmt
27
26#include <linux/slab.h> 28#include <linux/slab.h>
27#include <linux/kernel.h> 29#include <linux/kernel.h>
28#include <linux/string.h> 30#include <linux/string.h>
@@ -148,7 +150,7 @@ void x25_write_internal(struct sock *sk, int frametype)
148 case X25_RESET_CONFIRMATION: 150 case X25_RESET_CONFIRMATION:
149 break; 151 break;
150 default: 152 default:
151 printk(KERN_ERR "X.25: invalid frame type %02X\n", frametype); 153 pr_err("invalid frame type %02X\n", frametype);
152 return; 154 return;
153 } 155 }
154 156
@@ -338,7 +340,7 @@ int x25_decode(struct sock *sk, struct sk_buff *skb, int *ns, int *nr, int *q,
338 } 340 }
339 } 341 }
340 342
341 printk(KERN_DEBUG "X.25: invalid PLP frame %02X %02X %02X\n", 343 pr_debug("invalid PLP frame %02X %02X %02X\n",
342 frame[0], frame[1], frame[2]); 344 frame[0], frame[1], frame[2]);
343 345
344 return X25_ILLEGAL; 346 return X25_ILLEGAL;