diff options
author | Joe Perches <joe@perches.com> | 2014-11-11 16:37:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-11 18:11:00 -0500 |
commit | 6c91023dc35c88d5e6aebe4bfe6f1ed5ec2b84be (patch) | |
tree | 2f33e40962dd622ae926ff7e8284f3ef540d3ca9 /net/irda/ircomm/ircomm_tty.c | |
parent | 09626e9d153326ca82568e4e27f2daa53713992e (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/ircomm/ircomm_tty.c')
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 21 |
1 files changed, 10 insertions, 11 deletions
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 | ||