aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-11-11 16:37:30 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-11 18:11:00 -0500
commit6c91023dc35c88d5e6aebe4bfe6f1ed5ec2b84be (patch)
tree2f33e40962dd622ae926ff7e8284f3ef540d3ca9 /net/irda
parent09626e9d153326ca82568e4e27f2daa53713992e (diff)
irda: Remove IRDA_<TYPE> logging macros
And use the more common mechanisms directly. Other miscellanea: o Coalesce formats o Add missing newlines o Realign arguments o Remove unnecessary OOM message logging as there's a generic stack dump already on OOM. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
-rw-r--r--net/irda/af_irda.c34
-rw-r--r--net/irda/ircomm/ircomm_core.c5
-rw-r--r--net/irda/ircomm/ircomm_lmp.c2
-rw-r--r--net/irda/ircomm/ircomm_param.c3
-rw-r--r--net/irda/ircomm/ircomm_ttp.c10
-rw-r--r--net/irda/ircomm/ircomm_tty.c21
-rw-r--r--net/irda/ircomm/ircomm_tty_attach.c12
-rw-r--r--net/irda/ircomm/ircomm_tty_ioctl.c3
-rw-r--r--net/irda/irda_device.c18
-rw-r--r--net/irda/iriap.c24
-rw-r--r--net/irda/iriap_event.c4
-rw-r--r--net/irda/irias_object.c64
-rw-r--r--net/irda/irlan/irlan_client.c22
-rw-r--r--net/irda/irlan/irlan_client_event.c4
-rw-r--r--net/irda/irlan/irlan_common.c3
-rw-r--r--net/irda/irlan/irlan_eth.c2
-rw-r--r--net/irda/irlap.c15
-rw-r--r--net/irda/irlap_event.c5
-rw-r--r--net/irda/irlap_frame.c30
-rw-r--r--net/irda/irlmp.c19
-rw-r--r--net/irda/irlmp_event.c8
-rw-r--r--net/irda/irttp.c31
-rw-r--r--net/irda/parameters.c39
-rw-r--r--net/irda/qos.c12
-rw-r--r--net/irda/wrapper.c6
25 files changed, 190 insertions, 206 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 980bc2670a13..4b04ae06b288 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -201,16 +201,16 @@ static void irda_connect_confirm(void *instance, void *sap,
201 switch (sk->sk_type) { 201 switch (sk->sk_type) {
202 case SOCK_STREAM: 202 case SOCK_STREAM:
203 if (max_sdu_size != 0) { 203 if (max_sdu_size != 0) {
204 IRDA_ERROR("%s: max_sdu_size must be 0\n", 204 net_err_ratelimited("%s: max_sdu_size must be 0\n",
205 __func__); 205 __func__);
206 return; 206 return;
207 } 207 }
208 self->max_data_size = irttp_get_max_seg_size(self->tsap); 208 self->max_data_size = irttp_get_max_seg_size(self->tsap);
209 break; 209 break;
210 case SOCK_SEQPACKET: 210 case SOCK_SEQPACKET:
211 if (max_sdu_size == 0) { 211 if (max_sdu_size == 0) {
212 IRDA_ERROR("%s: max_sdu_size cannot be 0\n", 212 net_err_ratelimited("%s: max_sdu_size cannot be 0\n",
213 __func__); 213 __func__);
214 return; 214 return;
215 } 215 }
216 self->max_data_size = max_sdu_size; 216 self->max_data_size = max_sdu_size;
@@ -262,8 +262,8 @@ static void irda_connect_indication(void *instance, void *sap,
262 switch (sk->sk_type) { 262 switch (sk->sk_type) {
263 case SOCK_STREAM: 263 case SOCK_STREAM:
264 if (max_sdu_size != 0) { 264 if (max_sdu_size != 0) {
265 IRDA_ERROR("%s: max_sdu_size must be 0\n", 265 net_err_ratelimited("%s: max_sdu_size must be 0\n",
266 __func__); 266 __func__);
267 kfree_skb(skb); 267 kfree_skb(skb);
268 return; 268 return;
269 } 269 }
@@ -271,8 +271,8 @@ static void irda_connect_indication(void *instance, void *sap,
271 break; 271 break;
272 case SOCK_SEQPACKET: 272 case SOCK_SEQPACKET:
273 if (max_sdu_size == 0) { 273 if (max_sdu_size == 0) {
274 IRDA_ERROR("%s: max_sdu_size cannot be 0\n", 274 net_err_ratelimited("%s: max_sdu_size cannot be 0\n",
275 __func__); 275 __func__);
276 kfree_skb(skb); 276 kfree_skb(skb);
277 return; 277 return;
278 } 278 }
@@ -368,7 +368,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
368 368
369 self = priv; 369 self = priv;
370 if (!self) { 370 if (!self) {
371 IRDA_WARNING("%s: lost myself!\n", __func__); 371 net_warn_ratelimited("%s: lost myself!\n", __func__);
372 return; 372 return;
373 } 373 }
374 374
@@ -417,7 +417,7 @@ static void irda_selective_discovery_indication(discinfo_t *discovery,
417 417
418 self = priv; 418 self = priv;
419 if (!self) { 419 if (!self) {
420 IRDA_WARNING("%s: lost myself!\n", __func__); 420 net_warn_ratelimited("%s: lost myself!\n", __func__);
421 return; 421 return;
422 } 422 }
423 423
@@ -505,7 +505,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid)
505 notify_t notify; 505 notify_t notify;
506 506
507 if (self->lsap) { 507 if (self->lsap) {
508 IRDA_WARNING("%s(), busy!\n", __func__); 508 net_warn_ratelimited("%s(), busy!\n", __func__);
509 return -EBUSY; 509 return -EBUSY;
510 } 510 }
511 511
@@ -541,8 +541,8 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name)
541 IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name); 541 IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name);
542 542
543 if (self->iriap) { 543 if (self->iriap) {
544 IRDA_WARNING("%s(): busy with a previous query\n", 544 net_warn_ratelimited("%s(): busy with a previous query\n",
545 __func__); 545 __func__);
546 return -EBUSY; 546 return -EBUSY;
547 } 547 }
548 548
@@ -2129,8 +2129,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
2129 __func__, opt); 2129 __func__, opt);
2130 self->max_sdu_size_rx = opt; 2130 self->max_sdu_size_rx = opt;
2131 } else { 2131 } else {
2132 IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", 2132 net_warn_ratelimited("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
2133 __func__); 2133 __func__);
2134 err = -ENOPROTOOPT; 2134 err = -ENOPROTOOPT;
2135 goto out; 2135 goto out;
2136 } 2136 }
@@ -2441,8 +2441,8 @@ bed:
2441 2441
2442 /* Check that we can proceed with IAP */ 2442 /* Check that we can proceed with IAP */
2443 if (self->iriap) { 2443 if (self->iriap) {
2444 IRDA_WARNING("%s: busy with a previous query\n", 2444 net_warn_ratelimited("%s: busy with a previous query\n",
2445 __func__); 2445 __func__);
2446 kfree(ias_opt); 2446 kfree(ias_opt);
2447 err = -EBUSY; 2447 err = -EBUSY;
2448 goto out; 2448 goto out;
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index 4490a675b1bb..b77fe8c86238 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -69,7 +69,8 @@ static int __init ircomm_init(void)
69{ 69{
70 ircomm = hashbin_new(HB_LOCK); 70 ircomm = hashbin_new(HB_LOCK);
71 if (ircomm == NULL) { 71 if (ircomm == NULL) {
72 IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__); 72 net_err_ratelimited("%s(), can't allocate hashbin!\n",
73 __func__);
73 return -ENOMEM; 74 return -ENOMEM;
74 } 75 }
75 76
@@ -83,7 +84,7 @@ static int __init ircomm_init(void)
83 } 84 }
84#endif /* CONFIG_PROC_FS */ 85#endif /* CONFIG_PROC_FS */
85 86
86 IRDA_MESSAGE("IrCOMM protocol (Dag Brattli)\n"); 87 net_info_ratelimited("IrCOMM protocol (Dag Brattli)\n");
87 88
88 return 0; 89 return 0;
89} 90}
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c
index 6536114adf37..05767e3ef0d2 100644
--- a/net/irda/ircomm/ircomm_lmp.c
+++ b/net/irda/ircomm/ircomm_lmp.c
@@ -204,7 +204,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self,
204 } 204 }
205 ret = irlmp_data_request(self->lsap, skb); 205 ret = irlmp_data_request(self->lsap, skb);
206 if (ret) { 206 if (ret) {
207 IRDA_ERROR("%s(), failed\n", __func__); 207 net_err_ratelimited("%s(), failed\n", __func__);
208 /* irlmp_data_request already free the packet */ 208 /* irlmp_data_request already free the packet */
209 } 209 }
210 210
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
index f80b1a6a244b..c203fbb8cdd5 100644
--- a/net/irda/ircomm/ircomm_param.c
+++ b/net/irda/ircomm/ircomm_param.c
@@ -130,7 +130,8 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush)
130 count = irda_param_insert(self, pi, skb_tail_pointer(skb), 130 count = irda_param_insert(self, pi, skb_tail_pointer(skb),
131 skb_tailroom(skb), &ircomm_param_info); 131 skb_tailroom(skb), &ircomm_param_info);
132 if (count < 0) { 132 if (count < 0) {
133 IRDA_WARNING("%s(), no room for parameter!\n", __func__); 133 net_warn_ratelimited("%s(), no room for parameter!\n",
134 __func__);
134 spin_unlock_irqrestore(&self->spinlock, flags); 135 spin_unlock_irqrestore(&self->spinlock, flags);
135 return -1; 136 return -1;
136 } 137 }
diff --git a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c
index d362d711b79c..abe9a5ab8d34 100644
--- a/net/irda/ircomm/ircomm_ttp.c
+++ b/net/irda/ircomm/ircomm_ttp.c
@@ -188,7 +188,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self,
188 188
189 ret = irttp_data_request(self->tsap, skb); 189 ret = irttp_data_request(self->tsap, skb);
190 if (ret) { 190 if (ret) {
191 IRDA_ERROR("%s(), failed\n", __func__); 191 net_err_ratelimited("%s(), failed\n", __func__);
192 /* irttp_data_request already free the packet */ 192 /* irttp_data_request already free the packet */
193 } 193 }
194 194
@@ -237,8 +237,8 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap,
237 IRDA_ASSERT(qos != NULL, goto out;); 237 IRDA_ASSERT(qos != NULL, goto out;);
238 238
239 if (max_sdu_size != TTP_SAR_DISABLE) { 239 if (max_sdu_size != TTP_SAR_DISABLE) {
240 IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", 240 net_err_ratelimited("%s(), SAR not allowed for IrCOMM!\n",
241 __func__); 241 __func__);
242 goto out; 242 goto out;
243 } 243 }
244 244
@@ -278,8 +278,8 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap,
278 IRDA_ASSERT(qos != NULL, goto out;); 278 IRDA_ASSERT(qos != NULL, goto out;);
279 279
280 if (max_sdu_size != TTP_SAR_DISABLE) { 280 if (max_sdu_size != TTP_SAR_DISABLE) {
281 IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", 281 net_err_ratelimited("%s(), SAR not allowed for IrCOMM!\n",
282 __func__); 282 __func__);
283 goto out; 283 goto out;
284 } 284 }
285 285
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index 61ceb4cdb4a2..11b0a5ed0252 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -147,7 +147,8 @@ static int __init ircomm_tty_init(void)
147 return -ENOMEM; 147 return -ENOMEM;
148 ircomm_tty = hashbin_new(HB_LOCK); 148 ircomm_tty = hashbin_new(HB_LOCK);
149 if (ircomm_tty == NULL) { 149 if (ircomm_tty == NULL) {
150 IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__); 150 net_err_ratelimited("%s(), can't allocate hashbin!\n",
151 __func__);
151 put_tty_driver(driver); 152 put_tty_driver(driver);
152 return -ENOMEM; 153 return -ENOMEM;
153 } 154 }
@@ -163,8 +164,8 @@ static int __init ircomm_tty_init(void)
163 driver->flags = TTY_DRIVER_REAL_RAW; 164 driver->flags = TTY_DRIVER_REAL_RAW;
164 tty_set_operations(driver, &ops); 165 tty_set_operations(driver, &ops);
165 if (tty_register_driver(driver)) { 166 if (tty_register_driver(driver)) {
166 IRDA_ERROR("%s(): Couldn't register serial driver\n", 167 net_err_ratelimited("%s(): Couldn't register serial driver\n",
167 __func__); 168 __func__);
168 put_tty_driver(driver); 169 put_tty_driver(driver);
169 return -1; 170 return -1;
170 } 171 }
@@ -199,8 +200,8 @@ static void __exit ircomm_tty_cleanup(void)
199 200
200 ret = tty_unregister_driver(driver); 201 ret = tty_unregister_driver(driver);
201 if (ret) { 202 if (ret) {
202 IRDA_ERROR("%s(), failed to unregister driver\n", 203 net_err_ratelimited("%s(), failed to unregister driver\n",
203 __func__); 204 __func__);
204 return; 205 return;
205 } 206 }
206 207
@@ -256,7 +257,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
256 /* Connect IrCOMM link with remote device */ 257 /* Connect IrCOMM link with remote device */
257 ret = ircomm_tty_attach_cable(self); 258 ret = ircomm_tty_attach_cable(self);
258 if (ret < 0) { 259 if (ret < 0) {
259 IRDA_ERROR("%s(), error attaching cable!\n", __func__); 260 net_err_ratelimited("%s(), error attaching cable!\n", __func__);
260 goto err; 261 goto err;
261 } 262 }
262 263
@@ -389,10 +390,8 @@ static int ircomm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
389 if (!self) { 390 if (!self) {
390 /* No, so make new instance */ 391 /* No, so make new instance */
391 self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); 392 self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
392 if (self == NULL) { 393 if (self == NULL)
393 IRDA_ERROR("%s(), kmalloc failed!\n", __func__);
394 return -ENOMEM; 394 return -ENOMEM;
395 }
396 395
397 tty_port_init(&self->port); 396 tty_port_init(&self->port);
398 self->port.ops = &ircomm_port_ops; 397 self->port.ops = &ircomm_port_ops;
@@ -469,8 +468,8 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
469 468
470 if (wait_event_interruptible(self->port.close_wait, 469 if (wait_event_interruptible(self->port.close_wait,
471 !test_bit(ASYNCB_CLOSING, &self->port.flags))) { 470 !test_bit(ASYNCB_CLOSING, &self->port.flags))) {
472 IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n", 471 net_warn_ratelimited("%s - got signal while blocking on ASYNC_CLOSING!\n",
473 __func__); 472 __func__);
474 return -ERESTARTSYS; 473 return -ERESTARTSYS;
475 } 474 }
476 475
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c
index 2ee87bf387cc..211904419f68 100644
--- a/net/irda/ircomm/ircomm_tty_attach.c
+++ b/net/irda/ircomm/ircomm_tty_attach.c
@@ -694,8 +694,8 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self,
694 self->saddr = info->saddr; 694 self->saddr = info->saddr;
695 695
696 if (self->iriap) { 696 if (self->iriap) {
697 IRDA_WARNING("%s(), busy with a previous query\n", 697 net_warn_ratelimited("%s(), busy with a previous query\n",
698 __func__); 698 __func__);
699 return -EBUSY; 699 return -EBUSY;
700 } 700 }
701 701
@@ -752,8 +752,8 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self,
752 self->saddr = info->saddr; 752 self->saddr = info->saddr;
753 753
754 if (self->iriap) { 754 if (self->iriap) {
755 IRDA_WARNING("%s(), busy with a previous query\n", 755 net_warn_ratelimited("%s(), busy with a previous query\n",
756 __func__); 756 __func__);
757 return -EBUSY; 757 return -EBUSY;
758 } 758 }
759 759
@@ -822,8 +822,8 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self,
822 switch (event) { 822 switch (event) {
823 case IRCOMM_TTY_GOT_PARAMETERS: 823 case IRCOMM_TTY_GOT_PARAMETERS:
824 if (self->iriap) { 824 if (self->iriap) {
825 IRDA_WARNING("%s(), busy with a previous query\n", 825 net_warn_ratelimited("%s(), busy with a previous query\n",
826 __func__); 826 __func__);
827 return -EBUSY; 827 return -EBUSY;
828 } 828 }
829 829
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c
index ce943853c38d..7eb06e08f8ed 100644
--- a/net/irda/ircomm/ircomm_tty_ioctl.c
+++ b/net/irda/ircomm/ircomm_tty_ioctl.c
@@ -93,7 +93,8 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self,
93 self->settings.flow_control |= IRCOMM_RTS_CTS_IN; 93 self->settings.flow_control |= IRCOMM_RTS_CTS_IN;
94 /* This got me. Bummer. Jean II */ 94 /* This got me. Bummer. Jean II */
95 if (self->service_type == IRCOMM_3_WIRE_RAW) 95 if (self->service_type == IRCOMM_3_WIRE_RAW)
96 IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __func__); 96 net_warn_ratelimited("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n",
97 __func__);
97 } else { 98 } else {
98 self->port.flags &= ~ASYNC_CTS_FLOW; 99 self->port.flags &= ~ASYNC_CTS_FLOW;
99 self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; 100 self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN;
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index 9e0d909390fd..96788db1dc31 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -63,14 +63,14 @@ int __init irda_device_init( void)
63{ 63{
64 dongles = hashbin_new(HB_NOLOCK); 64 dongles = hashbin_new(HB_NOLOCK);
65 if (dongles == NULL) { 65 if (dongles == NULL) {
66 IRDA_WARNING("IrDA: Can't allocate dongles hashbin!\n"); 66 net_warn_ratelimited("IrDA: Can't allocate dongles hashbin!\n");
67 return -ENOMEM; 67 return -ENOMEM;
68 } 68 }
69 spin_lock_init(&dongles->hb_spinlock); 69 spin_lock_init(&dongles->hb_spinlock);
70 70
71 tasks = hashbin_new(HB_LOCK); 71 tasks = hashbin_new(HB_LOCK);
72 if (tasks == NULL) { 72 if (tasks == NULL) {
73 IRDA_WARNING("IrDA: Can't allocate tasks hashbin!\n"); 73 net_warn_ratelimited("IrDA: Can't allocate tasks hashbin!\n");
74 hashbin_delete(dongles, NULL); 74 hashbin_delete(dongles, NULL);
75 return -ENOMEM; 75 return -ENOMEM;
76 } 76 }
@@ -84,8 +84,8 @@ int __init irda_device_init( void)
84static void leftover_dongle(void *arg) 84static void leftover_dongle(void *arg)
85{ 85{
86 struct dongle_reg *reg = arg; 86 struct dongle_reg *reg = arg;
87 IRDA_WARNING("IrDA: Dongle type %x not unregistered\n", 87 net_warn_ratelimited("IrDA: Dongle type %x not unregistered\n",
88 reg->type); 88 reg->type);
89} 89}
90 90
91void irda_device_cleanup(void) 91void irda_device_cleanup(void)
@@ -150,8 +150,8 @@ int irda_device_is_receiving(struct net_device *dev)
150 IRDA_DEBUG(2, "%s()\n", __func__); 150 IRDA_DEBUG(2, "%s()\n", __func__);
151 151
152 if (!dev->netdev_ops->ndo_do_ioctl) { 152 if (!dev->netdev_ops->ndo_do_ioctl) {
153 IRDA_ERROR("%s: do_ioctl not impl. by device driver\n", 153 net_err_ratelimited("%s: do_ioctl not impl. by device driver\n",
154 __func__); 154 __func__);
155 return -1; 155 return -1;
156 } 156 }
157 157
@@ -201,15 +201,15 @@ static int irda_task_kick(struct irda_task *task)
201 do { 201 do {
202 timeout = task->function(task); 202 timeout = task->function(task);
203 if (count++ > 100) { 203 if (count++ > 100) {
204 IRDA_ERROR("%s: error in task handler!\n", 204 net_err_ratelimited("%s: error in task handler!\n",
205 __func__); 205 __func__);
206 irda_task_delete(task); 206 irda_task_delete(task);
207 return TRUE; 207 return TRUE;
208 } 208 }
209 } while ((timeout == 0) && (task->state != IRDA_TASK_DONE)); 209 } while ((timeout == 0) && (task->state != IRDA_TASK_DONE));
210 210
211 if (timeout < 0) { 211 if (timeout < 0) {
212 IRDA_ERROR("%s: Error executing task!\n", __func__); 212 net_err_ratelimited("%s: Error executing task!\n", __func__);
213 irda_task_delete(task); 213 irda_task_delete(task);
214 return TRUE; 214 return TRUE;
215 } 215 }
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index e1b37f5a2691..c2ea3443f669 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -110,8 +110,8 @@ int __init iriap_init(void)
110 /* Object repository - defined in irias_object.c */ 110 /* Object repository - defined in irias_object.c */
111 irias_objects = hashbin_new(HB_LOCK); 111 irias_objects = hashbin_new(HB_LOCK);
112 if (!irias_objects) { 112 if (!irias_objects) {
113 IRDA_WARNING("%s: Can't allocate irias_objects hashbin!\n", 113 net_warn_ratelimited("%s: Can't allocate irias_objects hashbin!\n",
114 __func__); 114 __func__);
115 hashbin_delete(iriap, NULL); 115 hashbin_delete(iriap, NULL);
116 return -ENOMEM; 116 return -ENOMEM;
117 } 117 }
@@ -180,10 +180,8 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
180 IRDA_DEBUG(2, "%s()\n", __func__); 180 IRDA_DEBUG(2, "%s()\n", __func__);
181 181
182 self = kzalloc(sizeof(*self), GFP_ATOMIC); 182 self = kzalloc(sizeof(*self), GFP_ATOMIC);
183 if (!self) { 183 if (!self)
184 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
185 return NULL; 184 return NULL;
186 }
187 185
188 /* 186 /*
189 * Initialize instance 187 * Initialize instance
@@ -283,7 +281,8 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
283 281
284 self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0); 282 self->lsap = irlmp_open_lsap(slsap_sel, &notify, 0);
285 if (self->lsap == NULL) { 283 if (self->lsap == NULL) {
286 IRDA_ERROR("%s: Unable to allocated LSAP!\n", __func__); 284 net_err_ratelimited("%s: Unable to allocated LSAP!\n",
285 __func__);
287 return -1; 286 return -1;
288 } 287 }
289 self->slsap_sel = self->lsap->slsap_sel; 288 self->slsap_sel = self->lsap->slsap_sel;
@@ -859,9 +858,8 @@ static int iriap_data_indication(void *instance, void *sap,
859 } 858 }
860 opcode = frame[0]; 859 opcode = frame[0];
861 if (~opcode & IAP_LST) { 860 if (~opcode & IAP_LST) {
862 IRDA_WARNING("%s:, IrIAS multiframe commands or " 861 net_warn_ratelimited("%s:, IrIAS multiframe commands or results is not implemented yet!\n",
863 "results is not implemented yet!\n", 862 __func__);
864 __func__);
865 goto out; 863 goto out;
866 } 864 }
867 865
@@ -945,16 +943,16 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
945 943
946 opcode = fp[0]; 944 opcode = fp[0];
947 if (~opcode & 0x80) { 945 if (~opcode & 0x80) {
948 IRDA_WARNING("%s: IrIAS multiframe commands or results " 946 net_warn_ratelimited("%s: IrIAS multiframe commands or results is not implemented yet!\n",
949 "is not implemented yet!\n", __func__); 947 __func__);
950 return; 948 return;
951 } 949 }
952 opcode &= 0x7f; /* Mask away LST bit */ 950 opcode &= 0x7f; /* Mask away LST bit */
953 951
954 switch (opcode) { 952 switch (opcode) {
955 case GET_INFO_BASE: 953 case GET_INFO_BASE:
956 IRDA_WARNING("%s: GetInfoBaseDetails not implemented yet!\n", 954 net_warn_ratelimited("%s: GetInfoBaseDetails not implemented yet!\n",
957 __func__); 955 __func__);
958 break; 956 break;
959 case GET_VALUE_BY_CLASS: 957 case GET_VALUE_BY_CLASS:
960 iriap_getvaluebyclass_indication(self, skb); 958 iriap_getvaluebyclass_indication(self, skb);
diff --git a/net/irda/iriap_event.c b/net/irda/iriap_event.c
index 703774e29e32..09de4efc73a7 100644
--- a/net/irda/iriap_event.c
+++ b/net/irda/iriap_event.c
@@ -368,10 +368,8 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
368 switch (event) { 368 switch (event) {
369 case IAP_LM_CONNECT_INDICATION: 369 case IAP_LM_CONNECT_INDICATION:
370 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); 370 tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC);
371 if (tx_skb == NULL) { 371 if (tx_skb == NULL)
372 IRDA_WARNING("%s: unable to malloc!\n", __func__);
373 return; 372 return;
374 }
375 373
376 /* Reserve space for MUX_CONTROL and LAP header */ 374 /* Reserve space for MUX_CONTROL and LAP header */
377 skb_reserve(tx_skb, LMP_MAX_HEADER); 375 skb_reserve(tx_skb, LMP_MAX_HEADER);
diff --git a/net/irda/irias_object.c b/net/irda/irias_object.c
index f07ed9fd5792..cd53692fe8c9 100644
--- a/net/irda/irias_object.c
+++ b/net/irda/irias_object.c
@@ -52,16 +52,16 @@ struct ias_object *irias_new_object( char *name, int id)
52 52
53 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC); 53 obj = kzalloc(sizeof(struct ias_object), GFP_ATOMIC);
54 if (obj == NULL) { 54 if (obj == NULL) {
55 IRDA_WARNING("%s(), Unable to allocate object!\n", 55 net_warn_ratelimited("%s(), Unable to allocate object!\n",
56 __func__); 56 __func__);
57 return NULL; 57 return NULL;
58 } 58 }
59 59
60 obj->magic = IAS_OBJECT_MAGIC; 60 obj->magic = IAS_OBJECT_MAGIC;
61 obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC); 61 obj->name = kstrndup(name, IAS_MAX_CLASSNAME, GFP_ATOMIC);
62 if (!obj->name) { 62 if (!obj->name) {
63 IRDA_WARNING("%s(), Unable to allocate name!\n", 63 net_warn_ratelimited("%s(), Unable to allocate name!\n",
64 __func__); 64 __func__);
65 kfree(obj); 65 kfree(obj);
66 return NULL; 66 return NULL;
67 } 67 }
@@ -73,8 +73,8 @@ struct ias_object *irias_new_object( char *name, int id)
73 obj->attribs = hashbin_new(HB_LOCK); 73 obj->attribs = hashbin_new(HB_LOCK);
74 74
75 if (obj->attribs == NULL) { 75 if (obj->attribs == NULL) {
76 IRDA_WARNING("%s(), Unable to allocate attribs!\n", 76 net_warn_ratelimited("%s(), Unable to allocate attribs!\n",
77 __func__); 77 __func__);
78 kfree(obj->name); 78 kfree(obj->name);
79 kfree(obj); 79 kfree(obj);
80 return NULL; 80 return NULL;
@@ -269,8 +269,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
269 /* Find object */ 269 /* Find object */
270 obj = hashbin_lock_find(irias_objects, 0, obj_name); 270 obj = hashbin_lock_find(irias_objects, 0, obj_name);
271 if (obj == NULL) { 271 if (obj == NULL) {
272 IRDA_WARNING("%s: Unable to find object: %s\n", __func__, 272 net_warn_ratelimited("%s: Unable to find object: %s\n",
273 obj_name); 273 __func__, obj_name);
274 return -1; 274 return -1;
275 } 275 }
276 276
@@ -280,8 +280,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
280 /* Find attribute */ 280 /* Find attribute */
281 attrib = hashbin_find(obj->attribs, 0, attrib_name); 281 attrib = hashbin_find(obj->attribs, 0, attrib_name);
282 if (attrib == NULL) { 282 if (attrib == NULL) {
283 IRDA_WARNING("%s: Unable to find attribute: %s\n", 283 net_warn_ratelimited("%s: Unable to find attribute: %s\n",
284 __func__, attrib_name); 284 __func__, attrib_name);
285 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); 285 spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
286 return -1; 286 return -1;
287 } 287 }
@@ -322,8 +322,8 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
322 322
323 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); 323 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
324 if (attrib == NULL) { 324 if (attrib == NULL) {
325 IRDA_WARNING("%s: Unable to allocate attribute!\n", 325 net_warn_ratelimited("%s: Unable to allocate attribute!\n",
326 __func__); 326 __func__);
327 return; 327 return;
328 } 328 }
329 329
@@ -333,8 +333,8 @@ void irias_add_integer_attrib(struct ias_object *obj, char *name, int value,
333 /* Insert value */ 333 /* Insert value */
334 attrib->value = irias_new_integer_value(value); 334 attrib->value = irias_new_integer_value(value);
335 if (!attrib->name || !attrib->value) { 335 if (!attrib->name || !attrib->value) {
336 IRDA_WARNING("%s: Unable to allocate attribute!\n", 336 net_warn_ratelimited("%s: Unable to allocate attribute!\n",
337 __func__); 337 __func__);
338 if (attrib->value) 338 if (attrib->value)
339 irias_delete_value(attrib->value); 339 irias_delete_value(attrib->value);
340 kfree(attrib->name); 340 kfree(attrib->name);
@@ -366,8 +366,8 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
366 366
367 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC); 367 attrib = kzalloc(sizeof(struct ias_attrib), GFP_ATOMIC);
368 if (attrib == NULL) { 368 if (attrib == NULL) {
369 IRDA_WARNING("%s: Unable to allocate attribute!\n", 369 net_warn_ratelimited("%s: Unable to allocate attribute!\n",
370 __func__); 370 __func__);
371 return; 371 return;
372 } 372 }
373 373
@@ -376,8 +376,8 @@ void irias_add_octseq_attrib(struct ias_object *obj, char *name, __u8 *octets,
376 376
377 attrib->value = irias_new_octseq_value( octets, len); 377 attrib->value = irias_new_octseq_value( octets, len);
378 if (!attrib->name || !attrib->value) { 378 if (!attrib->name || !attrib->value) {
379 IRDA_WARNING("%s: Unable to allocate attribute!\n", 379 net_warn_ratelimited("%s: Unable to allocate attribute!\n",
380 __func__); 380 __func__);
381 if (attrib->value) 381 if (attrib->value)
382 irias_delete_value(attrib->value); 382 irias_delete_value(attrib->value);
383 kfree(attrib->name); 383 kfree(attrib->name);
@@ -408,8 +408,8 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
408 408
409 attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC); 409 attrib = kzalloc(sizeof( struct ias_attrib), GFP_ATOMIC);
410 if (attrib == NULL) { 410 if (attrib == NULL) {
411 IRDA_WARNING("%s: Unable to allocate attribute!\n", 411 net_warn_ratelimited("%s: Unable to allocate attribute!\n",
412 __func__); 412 __func__);
413 return; 413 return;
414 } 414 }
415 415
@@ -418,8 +418,8 @@ void irias_add_string_attrib(struct ias_object *obj, char *name, char *value,
418 418
419 attrib->value = irias_new_string_value(value); 419 attrib->value = irias_new_string_value(value);
420 if (!attrib->name || !attrib->value) { 420 if (!attrib->name || !attrib->value) {
421 IRDA_WARNING("%s: Unable to allocate attribute!\n", 421 net_warn_ratelimited("%s: Unable to allocate attribute!\n",
422 __func__); 422 __func__);
423 if (attrib->value) 423 if (attrib->value)
424 irias_delete_value(attrib->value); 424 irias_delete_value(attrib->value);
425 kfree(attrib->name); 425 kfree(attrib->name);
@@ -442,10 +442,8 @@ struct ias_value *irias_new_integer_value(int integer)
442 struct ias_value *value; 442 struct ias_value *value;
443 443
444 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 444 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
445 if (value == NULL) { 445 if (value == NULL)
446 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
447 return NULL; 446 return NULL;
448 }
449 447
450 value->type = IAS_INTEGER; 448 value->type = IAS_INTEGER;
451 value->len = 4; 449 value->len = 4;
@@ -467,16 +465,14 @@ struct ias_value *irias_new_string_value(char *string)
467 struct ias_value *value; 465 struct ias_value *value;
468 466
469 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 467 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
470 if (value == NULL) { 468 if (value == NULL)
471 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
472 return NULL; 469 return NULL;
473 }
474 470
475 value->type = IAS_STRING; 471 value->type = IAS_STRING;
476 value->charset = CS_ASCII; 472 value->charset = CS_ASCII;
477 value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC); 473 value->t.string = kstrndup(string, IAS_MAX_STRING, GFP_ATOMIC);
478 if (!value->t.string) { 474 if (!value->t.string) {
479 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__); 475 net_warn_ratelimited("%s: Unable to kmalloc!\n", __func__);
480 kfree(value); 476 kfree(value);
481 return NULL; 477 return NULL;
482 } 478 }
@@ -498,10 +494,8 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
498 struct ias_value *value; 494 struct ias_value *value;
499 495
500 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 496 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
501 if (value == NULL) { 497 if (value == NULL)
502 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
503 return NULL; 498 return NULL;
504 }
505 499
506 value->type = IAS_OCT_SEQ; 500 value->type = IAS_OCT_SEQ;
507 /* Check length */ 501 /* Check length */
@@ -511,7 +505,7 @@ struct ias_value *irias_new_octseq_value(__u8 *octseq , int len)
511 505
512 value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC); 506 value->t.oct_seq = kmemdup(octseq, len, GFP_ATOMIC);
513 if (value->t.oct_seq == NULL){ 507 if (value->t.oct_seq == NULL){
514 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__); 508 net_warn_ratelimited("%s: Unable to kmalloc!\n", __func__);
515 kfree(value); 509 kfree(value);
516 return NULL; 510 return NULL;
517 } 511 }
@@ -523,10 +517,8 @@ struct ias_value *irias_new_missing_value(void)
523 struct ias_value *value; 517 struct ias_value *value;
524 518
525 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC); 519 value = kzalloc(sizeof(struct ias_value), GFP_ATOMIC);
526 if (value == NULL) { 520 if (value == NULL)
527 IRDA_WARNING("%s: Unable to kmalloc!\n", __func__);
528 return NULL; 521 return NULL;
529 }
530 522
531 value->type = IAS_MISSING; 523 value->type = IAS_MISSING;
532 524
diff --git a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c
index 42cf1390ce9c..f8eea02843f5 100644
--- a/net/irda/irlan/irlan_client.c
+++ b/net/irda/irlan/irlan_client.c
@@ -323,34 +323,34 @@ static void print_ret_code(__u8 code)
323 printk(KERN_INFO "Success\n"); 323 printk(KERN_INFO "Success\n");
324 break; 324 break;
325 case 1: 325 case 1:
326 IRDA_WARNING("IrLAN: Insufficient resources\n"); 326 net_warn_ratelimited("IrLAN: Insufficient resources\n");
327 break; 327 break;
328 case 2: 328 case 2:
329 IRDA_WARNING("IrLAN: Invalid command format\n"); 329 net_warn_ratelimited("IrLAN: Invalid command format\n");
330 break; 330 break;
331 case 3: 331 case 3:
332 IRDA_WARNING("IrLAN: Command not supported\n"); 332 net_warn_ratelimited("IrLAN: Command not supported\n");
333 break; 333 break;
334 case 4: 334 case 4:
335 IRDA_WARNING("IrLAN: Parameter not supported\n"); 335 net_warn_ratelimited("IrLAN: Parameter not supported\n");
336 break; 336 break;
337 case 5: 337 case 5:
338 IRDA_WARNING("IrLAN: Value not supported\n"); 338 net_warn_ratelimited("IrLAN: Value not supported\n");
339 break; 339 break;
340 case 6: 340 case 6:
341 IRDA_WARNING("IrLAN: Not open\n"); 341 net_warn_ratelimited("IrLAN: Not open\n");
342 break; 342 break;
343 case 7: 343 case 7:
344 IRDA_WARNING("IrLAN: Authentication required\n"); 344 net_warn_ratelimited("IrLAN: Authentication required\n");
345 break; 345 break;
346 case 8: 346 case 8:
347 IRDA_WARNING("IrLAN: Invalid password\n"); 347 net_warn_ratelimited("IrLAN: Invalid password\n");
348 break; 348 break;
349 case 9: 349 case 9:
350 IRDA_WARNING("IrLAN: Protocol error\n"); 350 net_warn_ratelimited("IrLAN: Protocol error\n");
351 break; 351 break;
352 case 255: 352 case 255:
353 IRDA_WARNING("IrLAN: Asynchronous status\n"); 353 net_warn_ratelimited("IrLAN: Asynchronous status\n");
354 break; 354 break;
355 } 355 }
356} 356}
@@ -380,7 +380,7 @@ void irlan_client_parse_response(struct irlan_cb *self, struct sk_buff *skb)
380 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); 380 IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;);
381 381
382 if (!skb) { 382 if (!skb) {
383 IRDA_ERROR("%s(), Got NULL skb!\n", __func__); 383 net_err_ratelimited("%s(), Got NULL skb!\n", __func__);
384 return; 384 return;
385 } 385 }
386 frame = skb->data; 386 frame = skb->data;
diff --git a/net/irda/irlan/irlan_client_event.c b/net/irda/irlan/irlan_client_event.c
index 8d5a8ebc444f..f9d11bf38157 100644
--- a/net/irda/irlan/irlan_client_event.c
+++ b/net/irda/irlan/irlan_client_event.c
@@ -100,8 +100,8 @@ static int irlan_client_state_idle(struct irlan_cb *self, IRLAN_EVENT event,
100 switch (event) { 100 switch (event) {
101 case IRLAN_DISCOVERY_INDICATION: 101 case IRLAN_DISCOVERY_INDICATION:
102 if (self->client.iriap) { 102 if (self->client.iriap) {
103 IRDA_WARNING("%s(), busy with a previous query\n", 103 net_warn_ratelimited("%s(), busy with a previous query\n",
104 __func__); 104 __func__);
105 return -EBUSY; 105 return -EBUSY;
106 } 106 }
107 107
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 5a2d0a695529..cc60b4a282ae 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -437,7 +437,8 @@ static void irlan_disconnect_indication(void *instance,
437 IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ ); 437 IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ );
438 break; 438 break;
439 default: 439 default:
440 IRDA_ERROR("%s(), Unknown disconnect reason\n", __func__); 440 net_err_ratelimited("%s(), Unknown disconnect reason\n",
441 __func__);
441 break; 442 break;
442 } 443 }
443 444
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index dc13f1a45f2f..94b948ef36f9 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -320,7 +320,7 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
320 320
321 if (dev->flags & IFF_PROMISC) { 321 if (dev->flags & IFF_PROMISC) {
322 /* Enable promiscuous mode */ 322 /* Enable promiscuous mode */
323 IRDA_WARNING("Promiscuous mode not implemented by IrLAN!\n"); 323 net_warn_ratelimited("Promiscuous mode not implemented by IrLAN!\n");
324 } else if ((dev->flags & IFF_ALLMULTI) || 324 } else if ((dev->flags & IFF_ALLMULTI) ||
325 netdev_mc_count(dev) > HW_MAX_ADDRS) { 325 netdev_mc_count(dev) > HW_MAX_ADDRS) {
326 /* Disable promiscuous mode, use normal mode. */ 326 /* Disable promiscuous mode, use normal mode. */
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index a778df55f5d6..2e3bc6ccf4b5 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -85,8 +85,8 @@ int __init irlap_init(void)
85 /* Allocate master array */ 85 /* Allocate master array */
86 irlap = hashbin_new(HB_LOCK); 86 irlap = hashbin_new(HB_LOCK);
87 if (irlap == NULL) { 87 if (irlap == NULL) {
88 IRDA_ERROR("%s: can't allocate irlap hashbin!\n", 88 net_err_ratelimited("%s: can't allocate irlap hashbin!\n",
89 __func__); 89 __func__);
90 return -ENOMEM; 90 return -ENOMEM;
91 } 91 }
92 92
@@ -491,7 +491,8 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
491 reason, NULL); 491 reason, NULL);
492 break; 492 break;
493 default: 493 default:
494 IRDA_ERROR("%s: Unknown reason %d\n", __func__, reason); 494 net_err_ratelimited("%s: Unknown reason %d\n",
495 __func__, reason);
495 } 496 }
496} 497}
497 498
@@ -540,8 +541,8 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
540 self->discovery_log = hashbin_new(HB_NOLOCK); 541 self->discovery_log = hashbin_new(HB_NOLOCK);
541 542
542 if (self->discovery_log == NULL) { 543 if (self->discovery_log == NULL) {
543 IRDA_WARNING("%s(), Unable to allocate discovery log!\n", 544 net_warn_ratelimited("%s(), Unable to allocate discovery log!\n",
544 __func__); 545 __func__);
545 return; 546 return;
546 } 547 }
547 548
@@ -625,10 +626,10 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
625{ 626{
626 switch (quality_of_link) { 627 switch (quality_of_link) {
627 case STATUS_NO_ACTIVITY: 628 case STATUS_NO_ACTIVITY:
628 IRDA_MESSAGE("IrLAP, no activity on link!\n"); 629 net_info_ratelimited("IrLAP, no activity on link!\n");
629 break; 630 break;
630 case STATUS_NOISY: 631 case STATUS_NOISY:
631 IRDA_MESSAGE("IrLAP, noisy link!\n"); 632 net_info_ratelimited("IrLAP, noisy link!\n");
632 break; 633 break;
633 default: 634 default:
634 break; 635 break;
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
index ccd214f9d196..5f4a84eb35c7 100644
--- a/net/irda/irlap_event.c
+++ b/net/irda/irlap_event.c
@@ -572,9 +572,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
572 info->discovery->data.daddr); 572 info->discovery->data.daddr);
573 573
574 if (!self->discovery_log) { 574 if (!self->discovery_log) {
575 IRDA_WARNING("%s: discovery log is gone! " 575 net_warn_ratelimited("%s: discovery log is gone! maybe the discovery timeout has been set too short?\n",
576 "maybe the discovery timeout has been set" 576 __func__);
577 " too short?\n", __func__);
578 break; 577 break;
579 } 578 }
580 hashbin_insert(self->discovery_log, 579 hashbin_insert(self->discovery_log,
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index a37998c6273d..90ef03658a74 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -421,7 +421,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
421 IRDA_ASSERT(self->magic == LAP_MAGIC, return;); 421 IRDA_ASSERT(self->magic == LAP_MAGIC, return;);
422 422
423 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) { 423 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) {
424 IRDA_ERROR("%s: frame too short!\n", __func__); 424 net_err_ratelimited("%s: frame too short!\n", __func__);
425 return; 425 return;
426 } 426 }
427 427
@@ -438,7 +438,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
438 } 438 }
439 439
440 if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) { 440 if ((discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC)) == NULL) {
441 IRDA_WARNING("%s: kmalloc failed!\n", __func__); 441 net_warn_ratelimited("%s: kmalloc failed!\n", __func__);
442 return; 442 return;
443 } 443 }
444 444
@@ -492,7 +492,7 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
492 char *text; 492 char *text;
493 493
494 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) { 494 if (!pskb_may_pull(skb, sizeof(struct xid_frame))) {
495 IRDA_ERROR("%s: frame too short!\n", __func__); 495 net_err_ratelimited("%s: frame too short!\n", __func__);
496 return; 496 return;
497 } 497 }
498 498
@@ -536,8 +536,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
536 /* Check if things are sane at this point... */ 536 /* Check if things are sane at this point... */
537 if((discovery_info == NULL) || 537 if((discovery_info == NULL) ||
538 !pskb_may_pull(skb, 3)) { 538 !pskb_may_pull(skb, 3)) {
539 IRDA_ERROR("%s: discovery frame too short!\n", 539 net_err_ratelimited("%s: discovery frame too short!\n",
540 __func__); 540 __func__);
541 return; 541 return;
542 } 542 }
543 543
@@ -545,10 +545,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
545 * We now have some discovery info to deliver! 545 * We now have some discovery info to deliver!
546 */ 546 */
547 discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC); 547 discovery = kzalloc(sizeof(discovery_t), GFP_ATOMIC);
548 if (!discovery) { 548 if (!discovery)
549 IRDA_WARNING("%s: unable to malloc!\n", __func__);
550 return; 549 return;
551 }
552 550
553 discovery->data.daddr = info->daddr; 551 discovery->data.daddr = info->daddr;
554 discovery->data.saddr = self->saddr; 552 discovery->data.saddr = self->saddr;
@@ -1170,7 +1168,7 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb,
1170 IRDA_ASSERT(info != NULL, return;); 1168 IRDA_ASSERT(info != NULL, return;);
1171 1169
1172 if (!pskb_may_pull(skb, 4)) { 1170 if (!pskb_may_pull(skb, 4)) {
1173 IRDA_ERROR("%s: frame too short!\n", __func__); 1171 net_err_ratelimited("%s: frame too short!\n", __func__);
1174 return; 1172 return;
1175 } 1173 }
1176 1174
@@ -1259,7 +1257,7 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb,
1259 IRDA_DEBUG(2, "%s()\n", __func__); 1257 IRDA_DEBUG(2, "%s()\n", __func__);
1260 1258
1261 if (!pskb_may_pull(skb, sizeof(*frame))) { 1259 if (!pskb_may_pull(skb, sizeof(*frame))) {
1262 IRDA_ERROR("%s: frame too short!\n", __func__); 1260 net_err_ratelimited("%s: frame too short!\n", __func__);
1263 return; 1261 return;
1264 } 1262 }
1265 frame = (struct test_frame *) skb->data; 1263 frame = (struct test_frame *) skb->data;
@@ -1328,13 +1326,13 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1328 * share and non linear skbs. This should never happen, so 1326 * share and non linear skbs. This should never happen, so
1329 * we don't need to be clever about it. Jean II */ 1327 * we don't need to be clever about it. Jean II */
1330 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { 1328 if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {
1331 IRDA_ERROR("%s: can't clone shared skb!\n", __func__); 1329 net_err_ratelimited("%s: can't clone shared skb!\n", __func__);
1332 goto err; 1330 goto err;
1333 } 1331 }
1334 1332
1335 /* Check if frame is large enough for parsing */ 1333 /* Check if frame is large enough for parsing */
1336 if (!pskb_may_pull(skb, 2)) { 1334 if (!pskb_may_pull(skb, 2)) {
1337 IRDA_ERROR("%s: frame too short!\n", __func__); 1335 net_err_ratelimited("%s: frame too short!\n", __func__);
1338 goto err; 1336 goto err;
1339 } 1337 }
1340 1338
@@ -1383,8 +1381,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1383 irlap_recv_srej_frame(self, skb, &info, command); 1381 irlap_recv_srej_frame(self, skb, &info, command);
1384 break; 1382 break;
1385 default: 1383 default:
1386 IRDA_WARNING("%s: Unknown S-frame %02x received!\n", 1384 net_warn_ratelimited("%s: Unknown S-frame %02x received!\n",
1387 __func__, info.control); 1385 __func__, info.control);
1388 break; 1386 break;
1389 } 1387 }
1390 goto out; 1388 goto out;
@@ -1421,8 +1419,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
1421 irlap_recv_ui_frame(self, skb, &info); 1419 irlap_recv_ui_frame(self, skb, &info);
1422 break; 1420 break;
1423 default: 1421 default:
1424 IRDA_WARNING("%s: Unknown frame %02x received!\n", 1422 net_warn_ratelimited("%s: Unknown frame %02x received!\n",
1425 __func__, info.control); 1423 __func__, info.control);
1426 break; 1424 break;
1427 } 1425 }
1428out: 1426out:
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index a5f28d421ea8..6178e71f3a51 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -170,10 +170,8 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid)
170 170
171 /* Allocate new instance of a LSAP connection */ 171 /* Allocate new instance of a LSAP connection */
172 self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC); 172 self = kzalloc(sizeof(struct lsap_cb), GFP_ATOMIC);
173 if (self == NULL) { 173 if (self == NULL)
174 IRDA_ERROR("%s: can't allocate memory\n", __func__);
175 return NULL; 174 return NULL;
176 }
177 175
178 self->magic = LMP_LSAP_MAGIC; 176 self->magic = LMP_LSAP_MAGIC;
179 self->slsap_sel = slsap_sel; 177 self->slsap_sel = slsap_sel;
@@ -297,10 +295,8 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
297 * Allocate new instance of a LSAP connection 295 * Allocate new instance of a LSAP connection
298 */ 296 */
299 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL); 297 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL);
300 if (lap == NULL) { 298 if (lap == NULL)
301 IRDA_ERROR("%s: unable to kmalloc\n", __func__);
302 return; 299 return;
303 }
304 300
305 lap->irlap = irlap; 301 lap->irlap = irlap;
306 lap->magic = LMP_LAP_MAGIC; 302 lap->magic = LMP_LAP_MAGIC;
@@ -311,7 +307,8 @@ void irlmp_register_link(struct irlap_cb *irlap, __u32 saddr, notify_t *notify)
311#endif 307#endif
312 lap->lsaps = hashbin_new(HB_LOCK); 308 lap->lsaps = hashbin_new(HB_LOCK);
313 if (lap->lsaps == NULL) { 309 if (lap->lsaps == NULL) {
314 IRDA_WARNING("%s(), unable to kmalloc lsaps\n", __func__); 310 net_warn_ratelimited("%s(), unable to kmalloc lsaps\n",
311 __func__);
315 kfree(lap); 312 kfree(lap);
316 return; 313 return;
317 } 314 }
@@ -852,8 +849,8 @@ void irlmp_do_discovery(int nslots)
852 849
853 /* Make sure the value is sane */ 850 /* Make sure the value is sane */
854 if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){ 851 if ((nslots != 1) && (nslots != 6) && (nslots != 8) && (nslots != 16)){
855 IRDA_WARNING("%s: invalid value for number of slots!\n", 852 net_warn_ratelimited("%s: invalid value for number of slots!\n",
856 __func__); 853 __func__);
857 nslots = sysctl_discovery_slots = 8; 854 nslots = sysctl_discovery_slots = 8;
858 } 855 }
859 856
@@ -1799,8 +1796,8 @@ static __u8 irlmp_find_free_slsap(void)
1799 1796
1800 /* Make sure we terminate the loop */ 1797 /* Make sure we terminate the loop */
1801 if (wrapped++) { 1798 if (wrapped++) {
1802 IRDA_ERROR("%s: no more free LSAPs !\n", 1799 net_err_ratelimited("%s: no more free LSAPs !\n",
1803 __func__); 1800 __func__);
1804 return 0; 1801 return 0;
1805 } 1802 }
1806 } 1803 }
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
index 9505a7d06f1a..30e51f9f4baf 100644
--- a/net/irda/irlmp_event.c
+++ b/net/irda/irlmp_event.c
@@ -508,8 +508,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
508 IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__); 508 IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __func__);
509 509
510 if (self->conn_skb) { 510 if (self->conn_skb) {
511 IRDA_WARNING("%s: busy with another request!\n", 511 net_warn_ratelimited("%s: busy with another request!\n",
512 __func__); 512 __func__);
513 return -EBUSY; 513 return -EBUSY;
514 } 514 }
515 /* Don't forget to refcount it (see irlmp_connect_request()) */ 515 /* Don't forget to refcount it (see irlmp_connect_request()) */
@@ -525,8 +525,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
525 break; 525 break;
526 case LM_CONNECT_INDICATION: 526 case LM_CONNECT_INDICATION:
527 if (self->conn_skb) { 527 if (self->conn_skb) {
528 IRDA_WARNING("%s: busy with another request!\n", 528 net_warn_ratelimited("%s: busy with another request!\n",
529 __func__); 529 __func__);
530 return -EBUSY; 530 return -EBUSY;
531 } 531 }
532 /* Don't forget to refcount it (see irlap_driver_rcv()) */ 532 /* Don't forget to refcount it (see irlap_driver_rcv()) */
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 85372cfa7b9f..e0b2b0d9af14 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -96,8 +96,8 @@ int __init irttp_init(void)
96 96
97 irttp->tsaps = hashbin_new(HB_LOCK); 97 irttp->tsaps = hashbin_new(HB_LOCK);
98 if (!irttp->tsaps) { 98 if (!irttp->tsaps) {
99 IRDA_ERROR("%s: can't allocate IrTTP hashbin!\n", 99 net_err_ratelimited("%s: can't allocate IrTTP hashbin!\n",
100 __func__); 100 __func__);
101 kfree(irttp); 101 kfree(irttp);
102 return -ENOMEM; 102 return -ENOMEM;
103 } 103 }
@@ -518,8 +518,8 @@ int irttp_close_tsap(struct tsap_cb *self)
518 if (self->connected) { 518 if (self->connected) {
519 /* Check if disconnect is not pending */ 519 /* Check if disconnect is not pending */
520 if (!test_bit(0, &self->disconnect_pend)) { 520 if (!test_bit(0, &self->disconnect_pend)) {
521 IRDA_WARNING("%s: TSAP still connected!\n", 521 net_warn_ratelimited("%s: TSAP still connected!\n",
522 __func__); 522 __func__);
523 irttp_disconnect_request(self, NULL, P_NORMAL); 523 irttp_disconnect_request(self, NULL, P_NORMAL);
524 } 524 }
525 self->close_pend = TRUE; 525 self->close_pend = TRUE;
@@ -568,13 +568,14 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
568 568
569 /* Check that nothing bad happens */ 569 /* Check that nothing bad happens */
570 if (!self->connected) { 570 if (!self->connected) {
571 IRDA_WARNING("%s(), Not connected\n", __func__); 571 net_warn_ratelimited("%s(), Not connected\n", __func__);
572 ret = -ENOTCONN; 572 ret = -ENOTCONN;
573 goto err; 573 goto err;
574 } 574 }
575 575
576 if (skb->len > self->max_seg_size) { 576 if (skb->len > self->max_seg_size) {
577 IRDA_ERROR("%s(), UData is too large for IrLAP!\n", __func__); 577 net_err_ratelimited("%s(), UData is too large for IrLAP!\n",
578 __func__);
578 ret = -EMSGSIZE; 579 ret = -EMSGSIZE;
579 goto err; 580 goto err;
580 } 581 }
@@ -617,7 +618,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
617 618
618 /* Check that nothing bad happens */ 619 /* Check that nothing bad happens */
619 if (!self->connected) { 620 if (!self->connected) {
620 IRDA_WARNING("%s: Not connected\n", __func__); 621 net_warn_ratelimited("%s: Not connected\n", __func__);
621 ret = -ENOTCONN; 622 ret = -ENOTCONN;
622 goto err; 623 goto err;
623 } 624 }
@@ -627,8 +628,8 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
627 * inside an IrLAP frame 628 * inside an IrLAP frame
628 */ 629 */
629 if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) { 630 if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) {
630 IRDA_ERROR("%s: SAR disabled, and data is too large for IrLAP!\n", 631 net_err_ratelimited("%s: SAR disabled, and data is too large for IrLAP!\n",
631 __func__); 632 __func__);
632 ret = -EMSGSIZE; 633 ret = -EMSGSIZE;
633 goto err; 634 goto err;
634 } 635 }
@@ -640,8 +641,8 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
640 if ((self->tx_max_sdu_size != 0) && 641 if ((self->tx_max_sdu_size != 0) &&
641 (self->tx_max_sdu_size != TTP_SAR_UNBOUND) && 642 (self->tx_max_sdu_size != TTP_SAR_UNBOUND) &&
642 (skb->len > self->tx_max_sdu_size)) { 643 (skb->len > self->tx_max_sdu_size)) {
643 IRDA_ERROR("%s: SAR enabled, but data is larger than TxMaxSduSize!\n", 644 net_err_ratelimited("%s: SAR enabled, but data is larger than TxMaxSduSize!\n",
644 __func__); 645 __func__);
645 ret = -EMSGSIZE; 646 ret = -EMSGSIZE;
646 goto err; 647 goto err;
647 } 648 }
@@ -1249,8 +1250,8 @@ static void irttp_connect_confirm(void *instance, void *sap,
1249 1250
1250 /* Any errors in the parameter list? */ 1251 /* Any errors in the parameter list? */
1251 if (ret < 0) { 1252 if (ret < 0) {
1252 IRDA_WARNING("%s: error extracting parameters\n", 1253 net_warn_ratelimited("%s: error extracting parameters\n",
1253 __func__); 1254 __func__);
1254 dev_kfree_skb(skb); 1255 dev_kfree_skb(skb);
1255 1256
1256 /* Do not accept this connection attempt */ 1257 /* Do not accept this connection attempt */
@@ -1326,8 +1327,8 @@ static void irttp_connect_indication(void *instance, void *sap,
1326 1327
1327 /* Any errors in the parameter list? */ 1328 /* Any errors in the parameter list? */
1328 if (ret < 0) { 1329 if (ret < 0) {
1329 IRDA_WARNING("%s: error extracting parameters\n", 1330 net_warn_ratelimited("%s: error extracting parameters\n",
1330 __func__); 1331 __func__);
1331 dev_kfree_skb(skb); 1332 dev_kfree_skb(skb);
1332 1333
1333 /* Do not accept this connection attempt */ 1334 /* Do not accept this connection attempt */
diff --git a/net/irda/parameters.c b/net/irda/parameters.c
index 6d0869716bf6..d7a5778262ef 100644
--- a/net/irda/parameters.c
+++ b/net/irda/parameters.c
@@ -158,8 +158,8 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
158 } 158 }
159 /* Check if buffer is long enough for insertion */ 159 /* Check if buffer is long enough for insertion */
160 if (len < (2+p.pl)) { 160 if (len < (2+p.pl)) {
161 IRDA_WARNING("%s: buffer too short for insertion!\n", 161 net_warn_ratelimited("%s: buffer too short for insertion!\n",
162 __func__); 162 __func__);
163 return -1; 163 return -1;
164 } 164 }
165 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__, 165 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __func__,
@@ -184,8 +184,8 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
184 184
185 break; 185 break;
186 default: 186 default:
187 IRDA_WARNING("%s: length %d not supported\n", 187 net_warn_ratelimited("%s: length %d not supported\n",
188 __func__, p.pl); 188 __func__, p.pl);
189 /* Skip parameter */ 189 /* Skip parameter */
190 return -1; 190 return -1;
191 } 191 }
@@ -214,9 +214,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
214 214
215 /* Check if buffer is long enough for parsing */ 215 /* Check if buffer is long enough for parsing */
216 if (len < (2+p.pl)) { 216 if (len < (2+p.pl)) {
217 IRDA_WARNING("%s: buffer too short for parsing! " 217 net_warn_ratelimited("%s: buffer too short for parsing! Need %d bytes, but len is only %d\n",
218 "Need %d bytes, but len is only %d\n", 218 __func__, p.pl, len);
219 __func__, p.pl, len);
220 return -1; 219 return -1;
221 } 220 }
222 221
@@ -226,9 +225,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
226 * PV_INTEGER means that the handler is flexible. 225 * PV_INTEGER means that the handler is flexible.
227 */ 226 */
228 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) { 227 if (((type & PV_MASK) != PV_INTEGER) && ((type & PV_MASK) != p.pl)) {
229 IRDA_ERROR("%s: invalid parameter length! " 228 net_err_ratelimited("%s: invalid parameter length! Expected %d bytes, but value had %d bytes!\n",
230 "Expected %d bytes, but value had %d bytes!\n", 229 __func__, type & PV_MASK, p.pl);
231 __func__, type & PV_MASK, p.pl);
232 230
233 /* Most parameters are bit/byte fields or little endian, 231 /* Most parameters are bit/byte fields or little endian,
234 * so it's ok to only extract a subset of it (the subset 232 * so it's ok to only extract a subset of it (the subset
@@ -265,8 +263,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
265 le32_to_cpus(&p.pv.i); 263 le32_to_cpus(&p.pv.i);
266 break; 264 break;
267 default: 265 default:
268 IRDA_WARNING("%s: length %d not supported\n", 266 net_warn_ratelimited("%s: length %d not supported\n",
269 __func__, p.pl); 267 __func__, p.pl);
270 268
271 /* Skip parameter */ 269 /* Skip parameter */
272 return p.pl+2; 270 return p.pl+2;
@@ -304,9 +302,8 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
304 302
305 /* Check if buffer is long enough for parsing */ 303 /* Check if buffer is long enough for parsing */
306 if (len < (2+p.pl)) { 304 if (len < (2+p.pl)) {
307 IRDA_WARNING("%s: buffer too short for parsing! " 305 net_warn_ratelimited("%s: buffer too short for parsing! Need %d bytes, but len is only %d\n",
308 "Need %d bytes, but len is only %d\n", 306 __func__, p.pl, len);
309 __func__, p.pl, len);
310 return -1; 307 return -1;
311 } 308 }
312 309
@@ -343,9 +340,8 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
343 340
344 /* Check if buffer is long enough for parsing */ 341 /* Check if buffer is long enough for parsing */
345 if (len < (2+p.pl)) { 342 if (len < (2+p.pl)) {
346 IRDA_WARNING("%s: buffer too short for parsing! " 343 net_warn_ratelimited("%s: buffer too short for parsing! Need %d bytes, but len is only %d\n",
347 "Need %d bytes, but len is only %d\n", 344 __func__, p.pl, len);
348 __func__, p.pl, len);
349 return -1; 345 return -1;
350 } 346 }
351 347
@@ -487,7 +483,8 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
487 483
488 /* Check if handler has been implemented */ 484 /* Check if handler has been implemented */
489 if (!pi_minor_info->func) { 485 if (!pi_minor_info->func) {
490 IRDA_MESSAGE("%s: no handler for pi=%#x\n", __func__, pi); 486 net_info_ratelimited("%s: no handler for pi=%#x\n",
487 __func__, pi);
491 /* Skip this parameter */ 488 /* Skip this parameter */
492 return -1; 489 return -1;
493 } 490 }
@@ -544,8 +541,8 @@ static int irda_param_extract(void *self, __u8 *buf, int len,
544 541
545 /* Check if handler has been implemented */ 542 /* Check if handler has been implemented */
546 if (!pi_minor_info->func) { 543 if (!pi_minor_info->func) {
547 IRDA_MESSAGE("%s: no handler for pi=%#x\n", 544 net_info_ratelimited("%s: no handler for pi=%#x\n",
548 __func__, buf[n]); 545 __func__, buf[n]);
549 /* Skip this parameter */ 546 /* Skip this parameter */
550 return 2 + buf[n + 1]; /* Continue */ 547 return 2 + buf[n + 1]; /* Continue */
551 } 548 }
diff --git a/net/irda/qos.c b/net/irda/qos.c
index 11a7cc0cbc28..f3b588c17d3b 100644
--- a/net/irda/qos.c
+++ b/net/irda/qos.c
@@ -200,8 +200,8 @@ static int msb_index (__u16 word)
200 * able to check precisely what's going on. If a end user sees this, 200 * able to check precisely what's going on. If a end user sees this,
201 * it's very likely the peer. - Jean II */ 201 * it's very likely the peer. - Jean II */
202 if (word == 0) { 202 if (word == 0) {
203 IRDA_WARNING("%s(), Detected buggy peer, adjust null PV to 0x1!\n", 203 net_warn_ratelimited("%s(), Detected buggy peer, adjust null PV to 0x1!\n",
204 __func__); 204 __func__);
205 /* The only safe choice (we don't know the array size) */ 205 /* The only safe choice (we don't know the array size) */
206 word = 0x1; 206 word = 0x1;
207 } 207 }
@@ -351,8 +351,8 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
351 if (sysctl_min_tx_turn_time > qos->min_turn_time.value) { 351 if (sysctl_min_tx_turn_time > qos->min_turn_time.value) {
352 int i; 352 int i;
353 353
354 IRDA_WARNING("%s(), Detected buggy peer, adjust mtt to %dus!\n", 354 net_warn_ratelimited("%s(), Detected buggy peer, adjust mtt to %dus!\n",
355 __func__, sysctl_min_tx_turn_time); 355 __func__, sysctl_min_tx_turn_time);
356 356
357 /* We don't really need bits, but easier this way */ 357 /* We don't really need bits, but easier this way */
358 i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times, 358 i = value_highest_bit(sysctl_min_tx_turn_time, min_turn_times,
@@ -402,8 +402,8 @@ static void irlap_adjust_qos_settings(struct qos_info *qos)
402 IRDA_DEBUG(2, "%s(), reducing data size to %d\n", 402 IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
403 __func__, qos->data_size.value); 403 __func__, qos->data_size.value);
404 } else { 404 } else {
405 IRDA_WARNING("%s(), nothing more we can do!\n", 405 net_warn_ratelimited("%s(), nothing more we can do!\n",
406 __func__); 406 __func__);
407 } 407 }
408 } 408 }
409#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */ 409#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c
index fd0995b1323a..9efffeb8d0f1 100644
--- a/net/irda/wrapper.c
+++ b/net/irda/wrapper.c
@@ -134,8 +134,8 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
134 * transmitted after this point is 5. 134 * transmitted after this point is 5.
135 */ 135 */
136 if(n >= (buffsize-5)) { 136 if(n >= (buffsize-5)) {
137 IRDA_ERROR("%s(), tx buffer overflow (n=%d)\n", 137 net_err_ratelimited("%s(), tx buffer overflow (n=%d)\n",
138 __func__, n); 138 __func__, n);
139 return n; 139 return n;
140 } 140 }
141 141
@@ -386,7 +386,7 @@ async_unwrap_ce(struct net_device *dev,
386 break; 386 break;
387 387
388 case LINK_ESCAPE: 388 case LINK_ESCAPE:
389 IRDA_WARNING("%s: state not defined\n", __func__); 389 net_warn_ratelimited("%s: state not defined\n", __func__);
390 break; 390 break;
391 391
392 case BEGIN_FRAME: 392 case BEGIN_FRAME: