HARDWARE MONITORING: Remove redundant power of
PATCH 1/1 HARDWARE MONITORING: Remove redundant power of
Since this source file already includes <log2.h>, there's no reason for it to redefine a power of 2 check.
---
not compile tested since it seems relatively obvious, but i'll let
someone else make the call here.
drivers/hwmon/adt7470.c +1 -3
@@ -114,8 +114,6 @@ I2C_CLIENT_INSMOD_1(adt7470);/* sleep 1s while gathering temperature data */ #define TEMP_COLLECTION_TIME 1000 -#define power_of_2 (x) (((x) & ((x) - 1)) = 0) -/* datasheet says to divide this number by the fan reading to get fan rpm */ #define FAN_PERIOD_TO_RPM (x) ((90000 * 60) / (x))#define FAN_RPM_TO_PERIOD FAN_PERIOD_TO_RPM
@@ -677,7 +675,7 @@ static int cvt_auto_temp(int input) {if (input =ADT7470_PWM_ALL_TEMPS )return 0 ; -if (input <1 || !power_of_2 (input)) +if (input <1 || !is_power_of_2 (input))return -EINVAL ;return ilog2 (input) +1 ; }
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA
Home page: http://crashcourse.ca Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
====================================
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] HARDWARE MONITORING: Remove redundant
Hi Robert,
Quoted 5 lines · Robert P. J. Day
Since this source file already includes <
log2.h>, there's no reason for it to redefine a power of 2 check.Signed-off-by Robert P. J. Day <[email protected]>
This patch is already in Mark's hwmon-testing tree:
http://lm-sensors.org/kernel?p=kernel/mhoffman/hwmon-2.6.git;a=commit;h‰eab87c21ffed88fe990876a7f754a4ddb34a83
All you have to do is wait for him to send a pull request to Linus (which should happen within a week, I guess.)
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH] HARDWARE MONITORING: Remove redundant
In reply to Robert P. J. DayQuoted 7 lines · Jean Delvare
Hi Robert,
Quoted 4 lines · Robert P. J. Day
Since this source file already includes <
log2.h>, there's no reason for it to redefine a power of 2 check.
Quoted 7 lines
Quoted 1 line
Signed-off-by Robert P. J. Day <[email protected]>This patch is already in Mark's hwmon-testing tree:
http://lm-sensors.org/kernel?p=kernel/mhoffman/hwmon-2.6.git;a=commit;h‰eab87c21ffed88fe990876a7f754a4ddb34a83All you have to do is wait for him to send a pull request to Linus (which should happen within a week, I guess.)
ok, thanks.
rday
--
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA
Home page: http://crashcourse.ca Fedora Cookbook: http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
====================================
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors