Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Matteo Croce" <technoboy85@gmail.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH] HID: core: demote data shortness warning to debug level
Date: Sat, 23 May 2026 10:45:32 +0000	[thread overview]
Message-ID: <20260523104532.8117D1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260523103806.60480-1-technoboy85@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch modifies the wrong warning message, failing to fix the stated issue and inappropriately masking a different error.
--

commit a5df696ba5cc949fba165e62139d8984b9884331
Author: Matteo Croce <teknoraver@meta.com>

HID: core: demote data shortness warning to debug level

This commit intends to reduce syslog flooding from devices that regularly
send short reports by demoting the "was too short" warning to a debug print.

> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 41a79e43c82b3..76cfed8b93c15 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -2050,8 +2050,8 @@ int hid_report_raw_event(struct hid_device *hid, enum hid_report_type type, u8 *
>  		return 0;
>  
>  	if (unlikely(bsize < csize)) {
> -		hid_warn_ratelimited(hid, "Event data for report %d is incorrect (%d vs %zu)\n",
> -				     report->id, csize, bsize);
> +		hid_dbg_ratelimited(hid, "Event data for report %d is incorrect (%d vs %zu)\n",
> +				    report->id, csize, bsize);

[Severity: Medium]
Does this change modify the intended warning message? 

The commit message notes the intention to silence the "was too short" warning.
However, this patch modifies the "is incorrect" warning instead, which triggers
when the reported size claims to be larger than the actual buffer size
(bsize < csize). 

The target "was too short" warning appears further down in the function during
the bsize < rsize check. 

As a result, this might leave the original syslog flooding issue unresolved
while potentially hiding a different transport driver condition.

>  		return -EINVAL;
>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260523103806.60480-1-technoboy85@gmail.com?part=1

      reply	other threads:[~2026-05-23 10:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23 10:38 [PATCH] HID: core: demote data shortness warning to debug level Matteo Croce
2026-05-23 10:45 ` sashiko-bot [this message]

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=20260523104532.8117D1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=technoboy85@gmail.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