Skip to content

Commit 337c22a

Browse files
d4ddi0bentiss
authored andcommitted
HID: core: reformat and reduce hid_printk macros
Reformat hid_printk macros to use standard __VA_ARGS__ syntax. Per Joe Perches hid_printk(), hid_emerg(), hid_crit(), and hid_alert() are unlikely ever to be used. Remove them. Signed-off-by: Joshua Clayton <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 2acf40f commit 337c22a

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

include/linux/hid.h

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,29 +1154,21 @@ int hid_pidff_init(struct hid_device *hid);
11541154
#define hid_pidff_init NULL
11551155
#endif
11561156

1157-
#define dbg_hid(format, arg...) \
1157+
#define dbg_hid(fmt, ...) \
11581158
do { \
11591159
if (hid_debug) \
1160-
printk(KERN_DEBUG "%s: " format, __FILE__, ##arg); \
1160+
printk(KERN_DEBUG "%s: " fmt, __FILE__, ##__VA_ARGS__); \
11611161
} while (0)
11621162

1163-
#define hid_printk(level, hid, fmt, arg...) \
1164-
dev_printk(level, &(hid)->dev, fmt, ##arg)
1165-
#define hid_emerg(hid, fmt, arg...) \
1166-
dev_emerg(&(hid)->dev, fmt, ##arg)
1167-
#define hid_crit(hid, fmt, arg...) \
1168-
dev_crit(&(hid)->dev, fmt, ##arg)
1169-
#define hid_alert(hid, fmt, arg...) \
1170-
dev_alert(&(hid)->dev, fmt, ##arg)
1171-
#define hid_err(hid, fmt, arg...) \
1172-
dev_err(&(hid)->dev, fmt, ##arg)
1173-
#define hid_notice(hid, fmt, arg...) \
1174-
dev_notice(&(hid)->dev, fmt, ##arg)
1175-
#define hid_warn(hid, fmt, arg...) \
1176-
dev_warn(&(hid)->dev, fmt, ##arg)
1177-
#define hid_info(hid, fmt, arg...) \
1178-
dev_info(&(hid)->dev, fmt, ##arg)
1179-
#define hid_dbg(hid, fmt, arg...) \
1180-
dev_dbg(&(hid)->dev, fmt, ##arg)
1163+
#define hid_err(hid, fmt, ...) \
1164+
dev_err(&(hid)->dev, fmt, ##__VA_ARGS__)
1165+
#define hid_notice(hid, fmt, ...) \
1166+
dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
1167+
#define hid_warn(hid, fmt, ...) \
1168+
dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
1169+
#define hid_info(hid, fmt, ...) \
1170+
dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
1171+
#define hid_dbg(hid, fmt, ...) \
1172+
dev_dbg(&(hid)->dev, fmt, ##__VA_ARGS__)
11811173

11821174
#endif

0 commit comments

Comments
 (0)