[PATCH] HID: remove duplicate hid_warn_ratelimited definition
From: 刘 凯
Date: Thu May 07 2026 - 04:41:34 EST
From 565c81e1b2e1aaad675d9844428af7b35f4328c6 Mon Sep 17 00:00:00 2001
From: Liu Kai <lukace97@xxxxxxxxxxx>
Date: Thu, 7 May 2026 16:32:04 +0800
Subject: [PATCH] HID: remove duplicate hid_warn_ratelimited definition
The hid_warn_ratelimited macro is defined twice in include/linux/hid.h:
at line 1317 (added by commit 4051ead99888) and at line 1339 (added by
commit 1d64624243af).
The second definition is correctly grouped with other ratelimited macros.
Remove the duplicate definition at line 1317.
Fixes: 1d64624243af ("HID: core: Add printk_ratelimited variants to hid_warn() etc")
Signed-off-by: Liu Kai <lukace97@xxxxxxxxxxx>
---
include/linux/hid.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 442a80d79e89..e1877a9a58e2 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -1314,8 +1314,6 @@ void hid_quirks_exit(__u16 bus);
dev_notice(&(hid)->dev, fmt, ##__VA_ARGS__)
#define hid_warn(hid, fmt, ...) \
dev_warn(&(hid)->dev, fmt, ##__VA_ARGS__)
-#define hid_warn_ratelimited(hid, fmt, ...) \
- dev_warn_ratelimited(&(hid)->dev, fmt, ##__VA_ARGS__)
#define hid_info(hid, fmt, ...) \
dev_info(&(hid)->dev, fmt, ##__VA_ARGS__)
#define hid_dbg(hid, fmt, ...) \
--
2.43.0