Thread (1 message) 1 message, 1 author, 2008-08-20

Re: [PATCH next-20080819] drivers/usb/atm: Fix non-existing warn()

From: Takashi Iwai <hidden>
Date: 2008-08-20 08:30:50

Possibly related (same subject, not in this thread)

At Tue, 19 Aug 2008 17:47:23 -0700,
Greg KH wrote:
On Tue, Aug 19, 2008 at 01:28:48PM +0200, Takashi Iwai wrote:
quoted
Fix the die-hard warn() in drivers/usb/atm/usbatm.h that caused a
build error.

Signed-off-by: Takashi Iwai <redacted>
---
diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h
index e6887c6..714dc14 100644
--- a/drivers/usb/atm/usbatm.h
+++ b/drivers/usb/atm/usbatm.h
@@ -42,7 +42,7 @@
 #ifdef DEBUG
 #define UDSL_ASSERT(x)	BUG_ON(!(x))
 #else
-#define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '%s' at line %d", __stringify(x), __LINE__); } while(0)
+#define UDSL_ASSERT(x)	do { if (!(x)) pr_warning("failed assertion '%s' at line %d", __stringify(x), __LINE__); } while(0)
 #endif
I fixed it a bit differently, using dev_warn() instead and passing the
"instance" to the macro like the other macros defined in this file.
That way any user knows exactly which device and driver caused the
driver to go boom :)
Thanks, that's much better.


Takashi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help