hwmon: (lm90) Drop redundant safety on cache lifetime
Subsystems (2)
PATCH 1/1 hwmon: (lm90) Drop redundant safety on cache lifetime
time_after (as opposed to time_after_equal) already ensures that the cache lifetime is at least as much as requested. There is no point in manually adding another jiffy to that value, and this can confuse the reader into wrong interpretation.
---
Tested OK on my ADM1032 evaluation board.
drivers/hwmon/lm90.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/lm90.c +2 -2
@@ -470,8 +470,8 @@ static struct lm90_data *lm90_update_devmutex_lock (&data->update_lock); - next_update = data->last_updated - +msecs_to_jiffies (data->update_interval) +1 ; + next_update = data->last_updated + +msecs_to_jiffies (data->update_interval);if (time_after (jiffies, next_update) || !data->valid) {u8 h, l;u8 alarms;
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 7 lines · Jean Delvare
time_after(as opposed totime_after_equal) already ensures that the cache lifetime is at least as much as requested. There is no point in manually adding another jiffy to that value, and this can confuse the reader into wrong interpretation.Signed-off-by Jean Delvare <[email protected]>Cc Imre Deak <[email protected]>
Quoted 29 lines
---
Tested OK on my ADM1032 evaluation board.drivers/hwmon/lm90.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/hwmon/lm90.c +2
-2@@ -470,8 +470,8 @@ static struct lm90_data *lm90_update_devmutex_lock (&data->update_lock); - next_update = data->last_updated - +msecs_to_jiffies (data->update_interval) +1 ; + next_update = data->last_updated + +msecs_to_jiffies (data->update_interval);if (time_after (jiffies, next_update) || !data->valid) {u8 h, l;u8 alarms;Signature · 7 lines
-- Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors