linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Lee <rob.lee@linaro.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux@arm.linux.org.uk, shawn.guo@freescale.com,
	amit.kachhap@linaro.org, amit.kucheria@linaro.org,
	linux-arm-kernel@lists.infradead.org, patches@linaro.org,
	linux-acpi@vger.kernel.org, lenb@kernel.org
Subject: Re: [RFC PATCH v2] ARM: imx: Add basic imx6q thermal management
Date: Tue, 17 Jan 2012 22:08:57 -0600	[thread overview]
Message-ID: <CAMXH7KFpCdLMdgBg9ES-rP+Wf=UaHmM5r09aL3RVv3akre0u7g@mail.gmail.com> (raw)
In-Reply-To: <20120117092324.GV5446@pengutronix.de>

Sascha, one comment below.  Agree with the rest of your comments and a
v3 patch with these fixes will be coming shortly.

>> +static int th_sys_get_temp(struct thermal_zone_device *thermal,
>> +                               unsigned long *temp)
>> +{
>> +     int tmp = 0;
>> +
>> +     imx6q_get_temp(&tmp);
>> +
>> +     /*
>> +      * The thermal framework code stores temperature in unsigned long. Also,
>> +      * it has references to "millicelcius" which limits the lowest
>> +      * temperature possible (compared to Kelvin).
>> +      */
>> +     if (likely(tmp > 0))
>
> Please no 'likely' in such slow pathes.
>

Why limit 'likely' and 'unlikely' to fast paths?  There usage should
also increase efficiency and thus power usage when used in
periodically/repetitively called code such as this.  In this case, the
increased efficiency will be extremely small but what is the downside
to using it here?
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2012-01-18  4:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17  4:38 [RFC PATCH v2] ARM: imx: Add basic imx6q thermal management Robert Lee
2012-01-17  4:51 ` Rob Lee
2012-01-17  5:11   ` Rob Lee
2012-01-17  9:23     ` Sascha Hauer
2012-01-18  4:08       ` Rob Lee [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='CAMXH7KFpCdLMdgBg9ES-rP+Wf=UaHmM5r09aL3RVv3akre0u7g@mail.gmail.com' \
    --to=rob.lee@linaro.org \
    --cc=amit.kachhap@linaro.org \
    --cc=amit.kucheria@linaro.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=patches@linaro.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@freescale.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;
as well as URLs for NNTP newsgroup(s).