From 1a4b6f66285785ddccef049e6b45be4e7c7a2189 Mon Sep 17 00:00:00 2001 From: matt mooney Date: Thu, 19 May 2011 16:47:32 -0700 Subject: staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_ This switches all of the usbip_u{dbg,err,info} and printk statements to dev_, if possible, or pr_ macros. And removes a few unnecessary debug statements. Signed-off-by: matt mooney Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/usbip_common.h | 46 +++++------------------------------- 1 file changed, 6 insertions(+), 40 deletions(-) (limited to 'drivers/staging/usbip/usbip_common.h') diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h index fd84ab2f9c2c..4a641c552b78 100644 --- a/drivers/staging/usbip/usbip_common.h +++ b/drivers/staging/usbip/usbip_common.h @@ -32,25 +32,13 @@ #define USBIP_VERSION "1.0.0" -/** - * usbip_udbg - print debug messages if CONFIG_USB_IP_DEBUG is defined - * @fmt: - * @args: - */ -#ifdef CONFIG_USB_IP_DEBUG - -#define usbip_udbg(fmt, args...) \ - do { \ - printk(KERN_DEBUG "%-10s:(%s,%d) %s: " fmt, \ - (in_interrupt() ? "interrupt" : (current)->comm),\ - __FILE__, __LINE__, __func__, ##args); \ - } while (0) +#undef pr_fmt +#ifdef DEBUG +#define pr_fmt(fmt) KBUILD_MODNAME ": %s:%d: " fmt, __func__, __LINE__ #else - -#define usbip_udbg(fmt, args...) do { } while (0) - -#endif /* CONFIG_USB_IP_DEBUG */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#endif enum { usbip_debug_xmit = (1 << 0), @@ -85,7 +73,7 @@ extern struct device_attribute dev_attr_usbip_debug; #define usbip_dbg_with_flag(flag, fmt, args...) \ do { \ if (flag & usbip_debug_flag) \ - usbip_udbg(fmt , ##args); \ + pr_debug(fmt, ##args); \ } while (0) #define usbip_dbg_sysfs(fmt, args...) \ @@ -115,28 +103,6 @@ extern struct device_attribute dev_attr_usbip_debug; #define usbip_dbg_stub_tx(fmt, args...) \ usbip_dbg_with_flag(usbip_debug_stub_tx, fmt , ##args) -/** - * usbip_uerr - print error messages - * @fmt: - * @args: - */ -#define usbip_uerr(fmt, args...) \ - do { \ - printk(KERN_ERR "%-10s: ***ERROR*** (%s,%d) %s: " fmt, \ - (in_interrupt() ? "interrupt" : (current)->comm),\ - __FILE__, __LINE__, __func__, ##args); \ - } while (0) - -/** - * usbip_uinfo - print information messages - * @fmt: - * @args: - */ -#define usbip_uinfo(fmt, args...) \ - do { \ - printk(KERN_INFO "usbip: " fmt , ## args); \ - } while (0) - /* * USB/IP request headers. * Currently, we define 4 request types: -- cgit v1.2.3