From: Basavaraj Natikar <bnatikar@amd.com>
To: Mario Limonciello <mario.limonciello@amd.com>, jikos@kernel.org
Cc: basavaraj.natikar@amd.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, David Chang <David.Chang@amd.com>
Subject: Re: [PATCH] HID: amd_sfh: Don't show client init failed as error when discovery fails
Date: Thu, 12 May 2022 23:46:18 +0530 [thread overview]
Message-ID: <55cfcf6c-df3e-ff77-c9dd-82d3123428b8@amd.com> (raw)
In-Reply-To: <20220512180043.26206-1-mario.limonciello@amd.com>
On 5/12/2022 11:30 PM, Mario Limonciello wrote:
> When sensor discovery fails, this means that the system doesn't have
> any sensors connected and a user should only be notified at most one time.
> A message is already displayed at WARN level of "failed ot discover,
s/failed ot/Failed to
> sensors not enabled". It's pointless to show that the client init failed
> at ERR level for the same condition.
>
> Check the return code and don't display this message in thoes conditions.
s/thoes/those
Thanks,
Basavaraj
>
> Fixes: b5d7f43e97da ("HID: amd_sfh: Add support for sensor discovery")
> Reported-by: David Chang <David.Chang@amd.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.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 dadc491bbf6b..1441787a154a 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -327,7 +327,8 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
> rc = amd_sfh_hid_client_init(privdata);
> if (rc) {
> amd_sfh_clear_intr(privdata);
> - dev_err(&pdev->dev, "amd_sfh_hid_client_init failed\n");
> + if (rc != -EOPNOTSUPP)
> + dev_err(&pdev->dev, "amd_sfh_hid_client_init failed\n");
> return rc;
> }
>
prev parent reply other threads:[~2022-05-12 18:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-12 18:00 [PATCH] HID: amd_sfh: Don't show client init failed as error when discovery fails Mario Limonciello
2022-05-12 18:16 ` Basavaraj Natikar [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=55cfcf6c-df3e-ff77-c9dd-82d3123428b8@amd.com \
--to=bnatikar@amd.com \
--cc=David.Chang@amd.com \
--cc=basavaraj.natikar@amd.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.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