Re: [RFC PATCH v2] ARM: imx: Add basic imx6q thermal management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux