Linux Input/HID development
 help / color / mirror / Atom feed
From: Benjamin Tissoires <bentiss@kernel.org>
To: "刘 凯" <lukace97@outlook.com>
Cc: "jikos@kernel.org" <jikos@kernel.org>,
	 "vi@endrift.com" <vi@endrift.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] HID: remove duplicate hid_warn_ratelimited definition
Date: Thu, 21 May 2026 16:33:57 +0200	[thread overview]
Message-ID: <ag8XEIP_KNBXoA_V@beelink> (raw)
In-Reply-To: <OS3PR01MB7969C09559DC6C0DCA520720C73C2@OS3PR01MB7969.jpnprd01.prod.outlook.com>

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

  reply	other threads:[~2026-05-21 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  8:41 [PATCH] HID: remove duplicate hid_warn_ratelimited definition 刘 凯
2026-05-21 14:33 ` Benjamin Tissoires [this message]
2026-05-21 14:45 ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ag8XEIP_KNBXoA_V@beelink \
    --to=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukace97@outlook.com \
    --cc=vi@endrift.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox