diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c
index 30d7020..f45d777 100644
--- a/drivers/usb/wusbcore/devconnect.c
+++ b/drivers/usb/wusbcore/devconnect.c
@@ -200,7 +200,6 @@
 	u8 dev_addr;
 	int result;
 
-	d_fnstart(3, dev, "(wusbhc %p port_idx %d)\n", wusbhc, port_idx);
 	/* Is it registered already? */
 	list_for_each_entry(wusb_dev, &wusbhc->cack_list, cack_node)
 		if (!memcmp(&wusb_dev->cdid, &dnc->CDID,
@@ -208,13 +207,8 @@
 			return wusb_dev;
 	/* We don't have it, create an entry, register it */
 	wusb_dev = wusb_dev_alloc(wusbhc);
-	if (wusb_dev == NULL) {
-		if (printk_ratelimit())
-			dev_err(dev, "DN CONNECT: no memory to process %s's %s "
-				"request\n", pr_cdid,
-				new_connection ? "connect" : "reconnect");
+	if (wusb_dev == NULL)
 		return NULL;
-	}
 	wusb_dev_init(wusb_dev);
 	wusb_dev->cdid = dnc->CDID;
 	wusb_dev->port_idx = port_idx;
@@ -246,7 +240,6 @@
 	list_add_tail(&wusb_dev->cack_node, &wusbhc->cack_list);
 	wusbhc->cack_count++;
 	wusbhc_fill_cack_ie(wusbhc);
-	d_fnend(3, dev, "(wusbhc %p port_idx %d)\n", wusbhc, port_idx);
 	return wusb_dev;
 }
 
@@ -334,13 +327,8 @@
 	for (idx = 0; idx < wusbhc->ports_max; idx++) {
 		port = wusb_port_by_idx(wusbhc, idx);
 		if (port->wusb_dev
-		    && !memcmp(&dnc->CDID, &port->wusb_dev->cdid,
-			       sizeof(dnc->CDID))) {
-			if (printk_ratelimit())
-				dev_err(dev, "Already handling dev %s "
-					" (it might be slow)\n", pr_cdid);
+		    && memcmp(&dnc->CDID, &port->wusb_dev->cdid, sizeof(dnc->CDID)) == 0)
 			goto error_unlock;
-		}
 	}
 	/* Look up those fake ports we have for a free one */
 	for (idx = 0; idx < wusbhc->ports_max; idx++) {
@@ -494,7 +482,6 @@
  */
 static void __wusbhc_keep_alive(struct wusbhc *wusbhc)
 {
-	int result;
 	struct device *dev = wusbhc->dev;
 	unsigned cnt;
 	struct wusb_dev *wusb_dev;
@@ -502,7 +489,6 @@
 	struct wuie_keep_alive *ie = &wusbhc->keep_alive_ie;
 	unsigned keep_alives, old_keep_alives;
 
-	d_fnstart(5, dev, "(wusbhc %p)\n", wusbhc);
 	old_keep_alives = ie->hdr.bLength - sizeof(ie->hdr);
 	keep_alives = 0;
 	for (cnt = 0;
@@ -531,13 +517,10 @@
 		ie->bDeviceAddress[keep_alives++] = 0x7f;
 	ie->hdr.bLength = sizeof(ie->hdr) +
 		keep_alives*sizeof(ie->bDeviceAddress[0]);
-	if (keep_alives > 0) {
-		result = wusbhc_mmcie_set(wusbhc, 10, 5, &ie->hdr);
-		if (result < 0 && printk_ratelimit())
-			dev_err(dev, "KEEPALIVE: can't set MMC: %d\n", result);
-	} else if (old_keep_alives != 0)
+	if (keep_alives > 0)
+		wusbhc_mmcie_set(wusbhc, 10, 5, &ie->hdr);
+	else if (old_keep_alives != 0)
 		wusbhc_mmcie_rm(wusbhc, &ie->hdr);
-	d_fnend(5, dev, "(wusbhc %p) = void\n", wusbhc);
 }
 
 /*
diff --git a/drivers/usb/wusbcore/mmc.c b/drivers/usb/wusbcore/mmc.c
index 7690728..cfa77a0 100644
--- a/drivers/usb/wusbcore/mmc.c
+++ b/drivers/usb/wusbcore/mmc.c
@@ -93,7 +93,6 @@
 		     struct wuie_hdr *wuie)
 {
 	int result = -ENOBUFS;
-	struct device *dev = wusbhc->dev;
 	unsigned handle, itr;
 
 	/* Search a handle, taking into account the ordering */
@@ -119,11 +118,8 @@
 			if (wusbhc->mmcie[itr] == NULL)
 				handle = itr;
 		}
-		if (handle == ~0) {
-			if (printk_ratelimit())
-				dev_err(dev, "MMC handle space exhausted\n");
+		if (handle == ~0)
 			goto error_unlock;
-		}
 	}
 	result = (wusbhc->mmcie_add)(wusbhc, interval, repeat_cnt, handle,
 				     wuie);
@@ -143,15 +139,15 @@
 void wusbhc_mmcie_rm(struct wusbhc *wusbhc, struct wuie_hdr *wuie)
 {
 	int result;
-	struct device *dev = wusbhc->dev;
 	unsigned handle, itr;
 
 	mutex_lock(&wusbhc->mmcie_mutex);
-	for (itr = 0; itr < wusbhc->mmcies_max; itr++)
+	for (itr = 0; itr < wusbhc->mmcies_max; itr++) {
 		if (wusbhc->mmcie[itr] == wuie) {
 			handle = itr;
 			goto found;
 		}
+	}
 	mutex_unlock(&wusbhc->mmcie_mutex);
 	return;
 
@@ -159,11 +155,7 @@
 	result = (wusbhc->mmcie_rm)(wusbhc, handle);
 	if (result == 0)
 		wusbhc->mmcie[itr] = NULL;
-	else if (printk_ratelimit())
-		dev_err(dev, "MMC: Failed to remove IE %p (0x%02x)\n",
-			wuie, wuie->bIEIdentifier);
 	mutex_unlock(&wusbhc->mmcie_mutex);
-	return;
 }
 EXPORT_SYMBOL_GPL(wusbhc_mmcie_rm);
 
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 @@
 	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 @@
 	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 3791cd95..5fe566b 100644
--- a/drivers/uwb/est.c
+++ b/drivers/uwb/est.c
@@ -363,22 +363,17 @@
 
 	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 @@
 		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 @@
 		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 @@
 }
 
 
-/** 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 @@
 		}
 		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 @@
 		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
 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 @@
 	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 @@
 	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 @@
 	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 */
