* [PATCH] HID: remove duplicate hid_warn_ratelimited definition
@ 2026-05-07 8:41 刘 凯
2026-05-21 14:33 ` Benjamin Tissoires
2026-05-21 14:45 ` Benjamin Tissoires
0 siblings, 2 replies; 3+ messages in thread
From: 刘 凯 @ 2026-05-07 8:41 UTC (permalink / raw)
To: jikos@kernel.org, bentiss@kernel.org
Cc: vi@endrift.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
From 565c81e1b2e1aaad675d9844428af7b35f4328c6 Mon Sep 17 00:00:00 2001
From: Liu Kai <lukace97@outlook.com>
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@outlook.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: remove duplicate hid_warn_ratelimited definition
2026-05-07 8:41 [PATCH] HID: remove duplicate hid_warn_ratelimited definition 刘 凯
@ 2026-05-21 14:33 ` Benjamin Tissoires
2026-05-21 14:45 ` Benjamin Tissoires
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2026-05-21 14:33 UTC (permalink / raw)
To: 刘 凯
Cc: jikos@kernel.org, vi@endrift.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Hi,
On May 07 2026, 刘 凯 wrote:
> From 565c81e1b2e1aaad675d9844428af7b35f4328c6 Mon Sep 17 00:00:00 2001
> From: Liu Kai <lukace97@outlook.com>
> 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).
Checkpatch complained about not using the proper format for commits
(i.e. 'commit <12+ chars of sha1> ("<title line>")'). Also, putting
lines numbers in a commit description is not great, because they are
only valid for the time you wrote the patch, and if we apply other
things in the middle, they get wrong.
Last, your email client (outlook) mangled the patch and converted tabs
to space. I managed to apply it with --ignore-whitespace in git am, but
this adds extra steps. Please fix your process for your next submission.
Anyway, I've taken your patch in my local queue, and reformulated the
commit description with the remarks I made above. I should push this
soon.
Cheers,
Benjamin
>
> 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@outlook.com>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: remove duplicate hid_warn_ratelimited definition
2026-05-07 8:41 [PATCH] HID: remove duplicate hid_warn_ratelimited definition 刘 凯
2026-05-21 14:33 ` Benjamin Tissoires
@ 2026-05-21 14:45 ` Benjamin Tissoires
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2026-05-21 14:45 UTC (permalink / raw)
To: jikos, 刘 凯; +Cc: vi, linux-input, linux-kernel
On Thu, 07 May 2026 08:41:08 +0000, 刘 凯 wrote:
> 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.
>
> [...]
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/hid/hid.git (for-7.1/upstream-fixes), thanks!
[1/1] HID: remove duplicate hid_warn_ratelimited definition
https://git.kernel.org/hid/hid/c/dd2147375a8f
Cheers,
--
Benjamin Tissoires <bentiss@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-21 14:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 8:41 [PATCH] HID: remove duplicate hid_warn_ratelimited definition 刘 凯
2026-05-21 14:33 ` Benjamin Tissoires
2026-05-21 14:45 ` Benjamin Tissoires
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox