From: Zhang Rui <rui.zhang@intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>, edubezval@gmail.com
Cc: "open list:THERMAL" <linux-pm@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
kong.kongxinwei@hisilicon.com, leo.yan@linaro.org
Subject: Re: [PATCH] thermal/drivers/hisi: Remove confusing error message
Date: Tue, 08 Aug 2017 15:55:56 +0800 [thread overview]
Message-ID: <1502178956.4296.7.camel@intel.com> (raw)
In-Reply-To: <1499439833-32531-1-git-send-email-daniel.lezcano@linaro.org>
On Fri, 2017-07-07 at 17:03 +0200, Daniel Lezcano wrote:
> The sensor id is unknown at init time and we use all id in the
> authorized
> MAX_SENSORS interval to register the sensor. On this SoC there is one
> thermal-zone with one sensor on it. No need to spit on the console
> everytime we
> failed to register thermal sensors, information which is deliberaly
> known as it
> is part of the discovery process.
>
> hisi_thermal f7030700.tsensor: failed to register sensor id 0: -19
> hisi_thermal f7030700.tsensor: failed to register thermal sensor:
> -19
> hisi_thermal f7030700.tsensor: failed to register sensor id 1: -19
> hisi_thermal f7030700.tsensor: failed to register thermal sensor:
> -19
> hisi_thermal f7030700.tsensor: failed to register sensor id 3: -19
> hisi_thermal f7030700.tsensor: failed to register thermal sensor:
> -19
>
> Remove the error messages.
>
> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/thermal/hisi_thermal.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/thermal/hisi_thermal.c
> b/drivers/thermal/hisi_thermal.c
> index f642966..2cc98c6 100644
> --- a/drivers/thermal/hisi_thermal.c
> +++ b/drivers/thermal/hisi_thermal.c
> @@ -187,6 +187,9 @@ static int hisi_thermal_get_temp(void *_sensor,
> int *temp)
>
> dev_dbg(&data->pdev->dev, "id=%d, irq=%d, temp=%d,
> thres=%d\n",
> sensor->id, data->irq_enabled, *temp, sensor-
> >thres_temp);
> +
> + printk("id=%d, irq=%d, temp=%d, thres=%d\n",
> + sensor->id, data->irq_enabled, *temp, sensor-
> >thres_temp);
what's this printk for?
> /*
> * Bind irq to sensor for two cases:
> * Reenable alarm IRQ if temperature below threshold;
> @@ -260,8 +263,6 @@ static int hisi_thermal_register_sensor(struct
> platform_device *pdev,
> if (IS_ERR(sensor->tzd)) {
> ret = PTR_ERR(sensor->tzd);
> sensor->tzd = NULL;
> - dev_err(&pdev->dev, "failed to register sensor id
> %d: %d\n",
> - sensor->id, ret);
> return ret;
> }
>
> @@ -352,10 +353,9 @@ static int hisi_thermal_probe(struct
> platform_device *pdev)
> ret = hisi_thermal_register_sensor(pdev, data,
> &data-
> >sensors[i], i);
> if (ret)
> - dev_err(&pdev->dev,
> - "failed to register thermal sensor:
> %d\n", ret);
> - else
> - hisi_thermal_toggle_sensor(&data-
> >sensors[i], true);
> + continue;
> +
> + hisi_thermal_toggle_sensor(&data->sensors[i], true);
> }
>
> return 0;
With these removed, is there any other information in dmesg that
suggests this failure?
thanks,
rui
next prev parent reply other threads:[~2017-08-08 7:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-07 15:03 [PATCH] thermal/drivers/hisi: Remove confusing error message Daniel Lezcano
2017-08-08 7:55 ` Zhang Rui [this message]
2017-08-08 10:15 ` Daniel Lezcano
2017-08-08 12:48 ` Zhang Rui
2017-08-08 13:29 ` Leo Yan
2017-08-11 3:14 ` Zhang Rui
2017-08-21 10:06 ` Daniel Lezcano
2017-08-22 8:04 ` Leo Yan
2017-08-22 8:25 ` Daniel Lezcano
2017-08-23 6:13 ` Leo Yan
2017-12-05 1:52 ` Eduardo Valentin
2017-12-05 6:48 ` Daniel Lezcano
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=1502178956.4296.7.camel@intel.com \
--to=rui.zhang@intel.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=kong.kongxinwei@hisilicon.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).