public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
@ 2026-03-04  8:25 Maximilian Pezzullo via B4 Relay
  2026-03-27 12:26 ` Jiri Kosina
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Maximilian Pezzullo via B4 Relay @ 2026-03-04  8:25 UTC (permalink / raw)
  To: Basavaraj Natikar, Jiri Kosina, Benjamin Tissoires
  Cc: Basavaraj Natikar, linux-input, linux-kernel, Casey Croy,
	Maximilian Pezzullo

From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>

When sensor discovery fails on systems without AMD SFH sensors, the
code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
return value is redundant and causes unnecessary alarm.

Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
have no AMD SFH sensors.

Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
---
 drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
index 1d9f955573aa..4b81cebdc335 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
@@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work)
 	rc = amd_sfh_hid_client_init(mp2);
 	if (rc) {
 		amd_sfh_clear_intr(mp2);
-		dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
+		if (rc != -EOPNOTSUPP)
+			dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
 		return;
 	}
 

---
base-commit: af4e9ef3d78420feb8fe58cd9a1ab80c501b3c08
change-id: 20260304-amd-sfh-suppress-eopnotsupp-err-0be59878e2fe

Best regards,
-- 
Maximilian Pezzullo <maximilianpezzullo@gmail.com>



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
  2026-03-04  8:25 [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP Maximilian Pezzullo via B4 Relay
@ 2026-03-27 12:26 ` Jiri Kosina
  2026-03-27 12:47 ` Basavaraj Natikar
  2026-03-27 13:12 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2026-03-27 12:26 UTC (permalink / raw)
  To: Maximilian Pezzullo, Basavaraj Natikar
  Cc: Benjamin Tissoires, linux-input, linux-kernel, Casey Croy

On Wed, 4 Mar 2026, Maximilian Pezzullo via B4 Relay wrote:

> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> 
> When sensor discovery fails on systems without AMD SFH sensors, the
> code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
> The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
> return value is redundant and causes unnecessary alarm.
> 
> Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
> have no AMD SFH sensors.
> 
> Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
> Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>

Basavaraj Natikar, could we please get your Ack on this? Thanks.

> ---
>  drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 1d9f955573aa..4b81cebdc335 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work)
>  	rc = amd_sfh_hid_client_init(mp2);
>  	if (rc) {
>  		amd_sfh_clear_intr(mp2);
> -		dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
> +		if (rc != -EOPNOTSUPP)
> +			dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
>  		return;
>  	}
>  
> 

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
  2026-03-04  8:25 [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP Maximilian Pezzullo via B4 Relay
  2026-03-27 12:26 ` Jiri Kosina
@ 2026-03-27 12:47 ` Basavaraj Natikar
  2026-03-27 13:12 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Basavaraj Natikar @ 2026-03-27 12:47 UTC (permalink / raw)
  To: maximilianpezzullo, Basavaraj Natikar, Jiri Kosina,
	Benjamin Tissoires
  Cc: linux-input, linux-kernel, Casey Croy


On 3/4/2026 1:55 PM, Maximilian Pezzullo via B4 Relay wrote:
> [You don't often get email from devnull+maximilianpezzullo.gmail.com@kernel.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
>
> When sensor discovery fails on systems without AMD SFH sensors, the
> code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
> The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
> return value is redundant and causes unnecessary alarm.
>
> Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
> have no AMD SFH sensors.
>
> Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
> Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> ---
>   drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 1d9f955573aa..4b81cebdc335 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -413,7 +413,8 @@ static void sfh_init_work(struct work_struct *work)
>          rc = amd_sfh_hid_client_init(mp2);
>          if (rc) {
>                  amd_sfh_clear_intr(mp2);
> -               dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
> +               if (rc != -EOPNOTSUPP)
> +                       dev_err(&pdev->dev, "amd_sfh_hid_client_init failed err %d\n", rc);
>                  return;
>          }

Looks good to me.

Acked-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>

Thanks,
--
Basavaraj

>
>
> ---
> base-commit: af4e9ef3d78420feb8fe58cd9a1ab80c501b3c08
> change-id: 20260304-amd-sfh-suppress-eopnotsupp-err-0be59878e2fe
>
> Best regards,
> --
> Maximilian Pezzullo <maximilianpezzullo@gmail.com>
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP
  2026-03-04  8:25 [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP Maximilian Pezzullo via B4 Relay
  2026-03-27 12:26 ` Jiri Kosina
  2026-03-27 12:47 ` Basavaraj Natikar
@ 2026-03-27 13:12 ` Jiri Kosina
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Kosina @ 2026-03-27 13:12 UTC (permalink / raw)
  To: Maximilian Pezzullo
  Cc: Basavaraj Natikar, Benjamin Tissoires, linux-input, linux-kernel,
	Casey Croy

On Wed, 4 Mar 2026, Maximilian Pezzullo via B4 Relay wrote:

> From: Maximilian Pezzullo <maximilianpezzullo@gmail.com>
> 
> When sensor discovery fails on systems without AMD SFH sensors, the
> code already emits a warning via dev_warn() in amd_sfh_hid_client_init().
> The subsequent dev_err() in sfh_init_work() for the same -EOPNOTSUPP
> return value is redundant and causes unnecessary alarm.
> 
> Suppress the dev_err() for -EOPNOTSUPP to avoid confusing users who
> have no AMD SFH sensors.
> 
> Fixes: 2105e8e00da4 ("HID: amd_sfh: Improve boot time when SFH is available")
> Reported-by: Casey Croy <ccroy@bugzilla.kernel.org>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221099
> Signed-off-by: Maximilian Pezzullo <maximilianpezzullo@gmail.com>

Applied to hid.git#for-7.0/upstream-fixes, thanks.

-- 
Jiri Kosina
SUSE Labs


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-27 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04  8:25 [PATCH] HID: amd_sfh: don't log error when device discovery fails with -EOPNOTSUPP Maximilian Pezzullo via B4 Relay
2026-03-27 12:26 ` Jiri Kosina
2026-03-27 12:47 ` Basavaraj Natikar
2026-03-27 13:12 ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox