Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Basavaraj Natikar" <Basavaraj.Natikar@amd.com>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH -next v2 4/4] HID: amd_sfh: Use report type from request node
Date: Tue, 06 Oct 2026 10:51:08 +0000	[thread overview]
Message-ID: <20261006105108.DE77A1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261006103754.3614316-5-Basavaraj.Natikar@amd.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] amd_sfh: incomplete cleanup of report_type array in amdtp_cl_data
--

commit 8029dfd0564b3015a23fe39f335b6a6e8b4706ba
Author: Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Use report type from request node

Use report type from request node while sending feature and input reports
to HID core. The cli_data report type array is never assigned and
feature reports are sent as input reports.

Closes: https://github.com/ublue-os/bazzite/issues/5796

> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c
> index ae6add0b9ce3f..a68b275f0456b 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c
> @@ -95,7 +95,7 @@ void amd_sfh_work(struct work_struct *work)
>  						    cli_data->feature_report[current_index]);
>  		if (report_size)
>  			hid_input_report(cli_data->hid_sensor_hubs[current_index],
> -					 cli_data->report_type[current_index],
> +					 node_type,

[Severity: Low]
This isn't a bug, but since this patch removes the usage of the report_type
array, should its declaration also be removed from struct amdtp_cl_data?

drivers/hid/amd-sfh-hid/amd_sfh_hid.h:amdtp_cl_data {
    ...
	u32 sensor_requested_cnt[MAX_HID_DEVICES];
	u8 report_type[MAX_HID_DEVICES];
	u8 report_id[MAX_HID_DEVICES];
    ...
};

Leaving the declaration wastes a small amount of memory and adds clutter as
dead code.

>  					 cli_data->feature_report[current_index], report_size, 0);
>  		else
>  			pr_err("AMDSFH: Invalid report size\n");

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261006103754.3614316-1-Basavaraj.Natikar@amd.com?part=4

      reply	other threads:[~2026-10-06 10:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 10:37 [PATCH -next v2 0/4] HID: amd_sfh: operating-mode telemetry sysfs and report fixes Basavaraj Natikar
2026-10-06 10:37 ` [PATCH -next v2 1/4] HID: amd_sfh: Move sysfs attributes to a separate file Basavaraj Natikar
2026-10-06 10:37 ` [PATCH -next v2 2/4] HID: amd_sfh: Add operating-mode telemetry sysfs attributes Basavaraj Natikar
2026-10-06 10:50   ` sashiko-bot
2026-10-06 10:37 ` [PATCH -next v2 3/4] HID: amd_sfh: Remove unsupported motion-state field from accelerometer report Basavaraj Natikar
2026-10-06 10:37 ` [PATCH -next v2 4/4] HID: amd_sfh: Use report type from request node Basavaraj Natikar
2026-10-06 10:51   ` 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=20261006105108.DE77A1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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