From: Dmitry Osipenko <digetx@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>,
Hardware Monitoring <linux-hwmon@vger.kernel.org>
Cc: Jean Delvare <jdelvare@suse.com>, Jon Hunter <jonathanh@nvidia.com>
Subject: Re: [PATCH] hwmon: Handle failure to register sensor with thermal zone correctly
Date: Mon, 21 Feb 2022 19:56:06 +0300 [thread overview]
Message-ID: <9ad46103-381b-ac0e-c263-cde0d26eab46@gmail.com> (raw)
In-Reply-To: <20220221164434.4169560-1-linux@roeck-us.net>
21.02.2022 19:44, Guenter Roeck пишет:
> diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
> index 3501a3ead4ba..4bfe3791a5ba 100644
> --- a/drivers/hwmon/hwmon.c
> +++ b/drivers/hwmon/hwmon.c
> @@ -214,12 +214,14 @@ static int hwmon_thermal_add_sensor(struct device *dev, int index)
>
> tzd = devm_thermal_zone_of_sensor_register(dev, index, tdata,
> &hwmon_thermal_ops);
> - /*
> - * If CONFIG_THERMAL_OF is disabled, this returns -ENODEV,
> - * so ignore that error but forward any other error.
> - */
> - if (IS_ERR(tzd) && (PTR_ERR(tzd) != -ENODEV))
> - return PTR_ERR(tzd);
> + if (IS_ERR(tzd)) {
> + if (PTR_ERR(tzd) != -ENODEV)
> + return PTR_ERR(tzd);
> + dev_warn(dev, "Failed to register temp%d_input with thermal zone\n",
> + index + 1);
Do we really need this warning? I suppose it should be okay if sensor
isn't attached to any device in a device-tree and just reports temperature.
next prev parent reply other threads:[~2022-02-21 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 16:44 [PATCH] hwmon: Handle failure to register sensor with thermal zone correctly Guenter Roeck
2022-02-21 16:56 ` Dmitry Osipenko [this message]
2022-02-21 17:12 ` Guenter Roeck
2022-02-21 17:59 ` Dmitry Osipenko
2022-02-21 18:23 ` Guenter Roeck
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=9ad46103-381b-ac0e-c263-cde0d26eab46@gmail.com \
--to=digetx@gmail.com \
--cc=jdelvare@suse.com \
--cc=jonathanh@nvidia.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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