summaryrefslogtreecommitdiffstats
path: root/drivers/uwb
diff options
context:
space:
mode:
authorDavid Vrabel <dv02@dv02pc01.europe.root.pri>2008-10-16 13:56:53 +0100
committerDavid Vrabel <dv02@dv02pc01.europe.root.pri>2008-10-16 13:56:53 +0100
commit8092d7c9789581eea478c40d615a2632c3af17bb (patch)
treea9fccedfcdbfd9a74220aa99d48fa8a003313deb /drivers/uwb
parent92c4d9bd1648b3eaca6b8b8f8932eec390ba7327 (diff)
downloadop-kernel-dev-8092d7c9789581eea478c40d615a2632c3af17bb.zip
op-kernel-dev-8092d7c9789581eea478c40d615a2632c3af17bb.tar.gz
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')
-rw-r--r--drivers/uwb/beacon.c9
-rw-r--r--drivers/uwb/est.c38
-rw-r--r--drivers/uwb/i1480/dfu/mac.c4
-rw-r--r--drivers/uwb/neh.c2
-rw-r--r--drivers/uwb/uwbd.c29
-rw-r--r--drivers/uwb/whc-rc.c8
6 files changed, 26 insertions, 64 deletions
diff --git a/drivers/uwb/beacon.c b/drivers/uwb/beacon.c
index 1ccf9eb..c7f3c97 100644
--- a/drivers/uwb/beacon.c
+++ b/drivers/uwb/beacon.c
@@ -410,7 +410,6 @@ int uwbd_evt_handle_rc_beacon(struct uwb_event *evt)
struct uwb_rc_evt_beacon *be;
struct uwb_beacon_frame *bf;
struct uwb_beca_e *bce;
- struct device *dev = &evt->rc->uwb_dev.dev;
unsigned long last_ts;
rc = evt->rc;
@@ -419,14 +418,12 @@ int uwbd_evt_handle_rc_beacon(struct uwb_event *evt)
if (result < 0)
return result;
- /* Ignore beacon if it is from an alien. */
+ /* FIXME: handle alien beacons. */
if (be->bBeaconType == UWB_RC_BEACON_TYPE_OL_ALIEN ||
be->bBeaconType == UWB_RC_BEACON_TYPE_NOL_ALIEN) {
- if (printk_ratelimit())
- dev_err(dev, "BEACON received from ALIEN. Action? \n");
- result = -ENOSYS;
- return 0;
+ return -ENOSYS;
}
+
bf = (struct uwb_beacon_frame *) be->BeaconInfo;
/*
diff --git a/drivers/uwb/est.c b/drivers/uwb/est.c
index 3791cd9..5fe566b 100644
--- a/drivers/uwb/est.c
+++ b/drivers/uwb/est.c
@@ -363,22 +363,17 @@ ssize_t uwb_est_get_size(struct uwb_rc *uwb_rc, struct uwb_est *est,
size = -ENOENT;
if (event_low >= est->entries) { /* in range? */
- if (printk_ratelimit())
- dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: "
- "event %u out of range\n",
- est, est->type_event_high, est->vendor,
- est->product, est->entries,
- event_low);
+ dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: event %u out of range\n",
+ est, est->type_event_high, est->vendor, est->product,
+ est->entries, event_low);
goto out;
}
size = -ENOENT;
entry = &est->entry[event_low];
if (entry->size == 0 && entry->offset == 0) { /* unknown? */
- if (printk_ratelimit())
- dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: "
- "event %u unknown\n",
- est, est->type_event_high, est->vendor,
- est->product, est->entries, event_low);
+ dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: event %u unknown\n",
+ est, est->type_event_high, est->vendor, est->product,
+ est->entries, event_low);
goto out;
}
offset = entry->offset; /* extra fries with that? */
@@ -396,11 +391,10 @@ ssize_t uwb_est_get_size(struct uwb_rc *uwb_rc, struct uwb_est *est,
default: BUG();
}
if (offset + type_size > rceb_size) {
- if (printk_ratelimit())
- dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: "
- "not enough data to read extra size\n",
- est, est->type_event_high, est->vendor,
- est->product, est->entries);
+ dev_err(dev, "EST %p 0x%04x/%04x/%04x[%u]: "
+ "not enough data to read extra size\n",
+ est, est->type_event_high, est->vendor,
+ est->product, est->entries);
goto out;
}
size = entry->size;
@@ -469,14 +463,12 @@ ssize_t uwb_est_find_size(struct uwb_rc *rc, const struct uwb_rceb *rceb,
if (size != -ENOENT)
goto out;
}
- /* FIXME: downgrade to _dbg() */
- if (printk_ratelimit())
- dev_err(dev, "event 0x%02x/%04x/%02x: no handlers available; "
+ dev_dbg(dev, "event 0x%02x/%04x/%02x: no handlers available; "
"RCEB %02x %02x %02x %02x\n",
- (unsigned) rceb->bEventType,
- (unsigned) le16_to_cpu(rceb->wEvent),
- (unsigned) rceb->bEventContext,
- ptr[0], ptr[1], ptr[2], ptr[3]);
+ (unsigned) rceb->bEventType,
+ (unsigned) le16_to_cpu(rceb->wEvent),
+ (unsigned) rceb->bEventContext,
+ ptr[0], ptr[1], ptr[2], ptr[3]);
size = -ENOENT;
out:
read_unlock_irqrestore(&uwb_est_lock, flags);
diff --git a/drivers/uwb/i1480/dfu/mac.c b/drivers/uwb/i1480/dfu/mac.c
index 8d06990..2e4d8f0 100644
--- a/drivers/uwb/i1480/dfu/mac.c
+++ b/drivers/uwb/i1480/dfu/mac.c
@@ -425,7 +425,7 @@ out:
}
-/** Wait for the MAC FW to start running */
+/* Wait for the MAC FW to start running */
static
int i1480_fw_is_running_q(struct i1480 *i1480)
{
@@ -443,8 +443,6 @@ int i1480_fw_is_running_q(struct i1480 *i1480)
}
if (*val == 0x55555555UL) /* fw running? cool */
goto out;
- if (printk_ratelimit())
- d_printf(5, i1480->dev, "read #%d: 0x%08x\n", cnt, *val);
}
dev_err(i1480->dev, "Timed out waiting for fw to start\n");
result = -ETIMEDOUT;
diff --git a/drivers/uwb/neh.c b/drivers/uwb/neh.c
index 91b6148..9b4eb64 100644
--- a/drivers/uwb/neh.c
+++ b/drivers/uwb/neh.c
@@ -440,7 +440,7 @@ static void uwb_rc_neh_grok_event(struct uwb_rc *rc, struct uwb_rceb *rceb, size
neh = uwb_rc_neh_lookup(rc, rceb);
if (neh)
uwb_rc_neh_cb(neh, rceb, size);
- else if (printk_ratelimit())
+ else
dev_warn(dev, "event 0x%02x/%04x/%02x (%zu bytes): nobody cared\n",
rceb->bEventType, le16_to_cpu(rceb->wEvent),
rceb->bEventContext, size);
diff --git a/drivers/uwb/uwbd.c b/drivers/uwb/uwbd.c
index b3673d6..7890841 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)
diff --git a/drivers/uwb/whc-rc.c b/drivers/uwb/whc-rc.c
index 5a93abe..1711dea 100644
--- a/drivers/uwb/whc-rc.c
+++ b/drivers/uwb/whc-rc.c
@@ -212,7 +212,6 @@ irqreturn_t whcrc_irq_cb(int irq, void *_whcrc)
struct device *dev = &whcrc->umc_dev->dev;
u32 urcsts;
- d_fnstart(4, dev, "irq %d _whcrc %p)\n", irq, _whcrc);
urcsts = le_readl(whcrc->rc_base + URCSTS);
if (!(urcsts & URCSTS_INT_MASK))
return IRQ_NONE;
@@ -221,13 +220,6 @@ irqreturn_t whcrc_irq_cb(int irq, void *_whcrc)
d_printf(4, dev, "acked 0x%08x, urcsts 0x%08x\n",
le_readl(whcrc->rc_base + URCSTS), urcsts);
- if (whcrc->uwb_rc == NULL) {
- if (printk_ratelimit())
- dev_dbg(dev, "Received interrupt when not yet "
- "ready!\n");
- goto out;
- }
-
if (urcsts & URCSTS_HSE) {
dev_err(dev, "host system error -- hardware halted\n");
/* FIXME: do something sensible here */
OpenPOWER on IntegriCloud