From: Jiri Slaby Date: Sun, 9 Mar 2008 15:29:24 +0000 (+0100) Subject: HID: make function from dbg_hid X-Git-Tag: v2.6.26-rc1~1107^2~12 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b184cf37f5cf098f07725b483a2055e95725476;p=linux-2.6 HID: make function from dbg_hid To check paramters even if debug is disabled, convert dbg_hid to inline function with __attribute__(format) checking. Signed-off-by: Jiri Slaby Signed-off-by: Jiri Kosina --- diff --git a/include/linux/hid.h b/include/linux/hid.h index 5bf6282f16..69ba58434d 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -569,7 +569,11 @@ static inline int hid_ff_init(struct hid_device *hid) { return -1; } #define dbg_hid_line(format, arg...) if (hid_debug) \ printk(format, ## arg) #else -#define dbg_hid(format, arg...) do {} while (0) +static inline int __attribute__((format(printf, 1, 2))) +dbg_hid(const char *fmt, ...) +{ + return 0; +} #define dbg_hid_line dbg_hid #endif