From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Eduardo Valentin <edubezval@gmail.com>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Lukasz Majewski <l.majewski@samsung.com>,
devicetree@vger.kernel.org, Kukjin Kim <kgene.kim@samsung.com>,
LKML <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>,
linux-samsung-soc@vger.kernel.org,
Grant Likely <grant.likely@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv3 1/1] thermal: cpu_cooling: check for the readiness of cpufreq layer
Date: Fri, 28 Nov 2014 17:10:24 +0000 [thread overview]
Message-ID: <20141128171024.GW3836@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1417186410-24551-1-git-send-email-edubezval@gmail.com>
On Fri, Nov 28, 2014 at 10:53:30AM -0400, Eduardo Valentin wrote:
> diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c
> index 3f5ad25..d4eaa1b 100644
> --- a/drivers/thermal/samsung/exynos_thermal_common.c
> +++ b/drivers/thermal/samsung/exynos_thermal_common.c
> @@ -371,9 +371,10 @@ int exynos_register_thermal(struct thermal_sensor_conf *sensor_conf)
> th_zone->cool_dev[th_zone->cool_dev_size] =
> cpufreq_cooling_register(&mask_val);
> if (IS_ERR(th_zone->cool_dev[th_zone->cool_dev_size])) {
> - dev_err(sensor_conf->dev,
> - "Failed to register cpufreq cooling device\n");
> - ret = -EINVAL;
> + ret = PTR_ERR(th_zone->cool_dev[th_zone->cool_dev_size]);
> + if (ret != -EPROBE_DEFER)
> + dev_err(sensor_conf->dev,
> + "Failed to register cpufreq cooling device\n");
Something which bugs me quite a lot is when there is an error code (which
tells you why something didn't work) and you have an error message, and
the error message doesn't bother printing the error code.
You might as well just print "Failed\n" and leave it at that, or md5sum
the error message and print the sum instead. :)
Knowing why something failed allows you to read the source, and find
possible reasons for the failure (which could come down to one reason)
and allows faster resolution of the problem.
--
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2014-11-28 17:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-28 14:53 [PATCHv3 1/1] thermal: cpu_cooling: check for the readiness of cpufreq layer Eduardo Valentin
2014-11-28 17:10 ` Russell King - ARM Linux [this message]
2014-11-28 15:09 ` Eduardo Valentin
2014-12-03 6:30 ` Viresh Kumar
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=20141128171024.GW3836@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=ch.naveen@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=grant.likely@linaro.org \
--cc=kgene.kim@samsung.com \
--cc=l.majewski@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=viresh.kumar@linaro.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).