diff options
author | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-10-16 14:56:53 +0200 |
---|---|---|
committer | David Vrabel <dv02@dv02pc01.europe.root.pri> | 2008-10-16 14:56:53 +0200 |
commit | 8092d7c9789581eea478c40d615a2632c3af17bb (patch) | |
tree | a9fccedfcdbfd9a74220aa99d48fa8a003313deb /drivers/uwb/uwbd.c | |
parent | uwb: use kcalloc where appropriate (diff) | |
download | linux-8092d7c9789581eea478c40d615a2632c3af17bb.tar.xz linux-8092d7c9789581eea478c40d615a2632c3af17bb.zip |
uwb: don't use printk_ratelimit() so often
Avoid using printk_ratelimit() in many places because:
- many were error messages reporting broken hardware (it's useful to
get all of these).
- the message itself wasn't useful so the message has been removed.
Signed-off-by: David Vrabel <david.vrabel@csr.com>
Diffstat (limited to 'drivers/uwb/uwbd.c')
-rw-r--r-- | drivers/uwb/uwbd.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/drivers/uwb/uwbd.c b/drivers/uwb/uwbd.c index b3673d614adb..78908416e42c 100644 --- a/drivers/uwb/uwbd.c +++ b/drivers/uwb/uwbd.c @@ -188,7 +188,6 @@ static DEFINE_MUTEX(uwbd_event_mutex); static int uwbd_event_handle_urc(struct uwb_event *evt) { - int result; struct uwbd_evt_type_handler *type_table; uwbd_evt_handler_f handler; u8 type, context; @@ -199,41 +198,25 @@ int uwbd_event_handle_urc(struct uwb_event *evt) context = evt->notif.rceb->bEventContext; if (type > uwbd_evt_type_handlers_len) { - if (printk_ratelimit()) - printk(KERN_ERR "UWBD: event type %u: unknown " - "(too high)\n", type); + printk(KERN_ERR "UWBD: event type %u: unknown (too high)\n", type); return -EINVAL; } type_table = &uwbd_evt_type_handlers[type]; if (type_table->uwbd_events == NULL) { - if (printk_ratelimit()) - printk(KERN_ERR "UWBD: event type %u: unknown\n", type); + printk(KERN_ERR "UWBD: event type %u: unknown\n", type); return -EINVAL; } if (event > type_table->size) { - if (printk_ratelimit()) - printk(KERN_ERR "UWBD: event %s[%u]: " - "unknown (too high)\n", type_table->name, event); + printk(KERN_ERR "UWBD: event %s[%u]: unknown (too high)\n", + type_table->name, event); return -EINVAL; } handler = type_table->uwbd_events[event].handler; if (handler == NULL) { - if (printk_ratelimit()) - printk(KERN_ERR "UWBD: event %s[%u]: unknown\n", - type_table->name, event); + printk(KERN_ERR "UWBD: event %s[%u]: unknown\n", type_table->name, event); return -EINVAL; } - d_printf(3, NULL, "processing 0x%02x/%04x/%02x, %zu bytes\n", - type, event, context, evt->notif.size); - result = (*handler)(evt); - if (result < 0) { - if (printk_ratelimit()) - printk(KERN_ERR "UWBD: event 0x%02x/%04x/%02x, " - "table %s[%u]: handling failed: %d\n", - type, event, context, type_table->name, - event, result); - } - return result; + return (*handler)(evt); } static void uwbd_event_handle_message(struct uwb_event *evt) |