mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 10:56:14 +00:00
hwmon: (adm1031) Remove redundant assignment to variable range
Variable range is being initialized with a value that is never read, it is being re-assigned in the next statement. The assignment is redundant, remove it and initialize range using the second assigned value. Clean up the formatting too by adding missing spaces. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20211204233155.55454-1-colin.i.king@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
3315e71699
commit
d75553790b
@ -242,9 +242,8 @@ static int FAN_TO_REG(int reg, int div)
|
||||
static int AUTO_TEMP_MAX_TO_REG(int val, int reg, int pwm)
|
||||
{
|
||||
int ret;
|
||||
int range = val - AUTO_TEMP_MIN_FROM_REG(reg);
|
||||
int range = ((val - AUTO_TEMP_MIN_FROM_REG(reg)) * 10) / (16 - pwm);
|
||||
|
||||
range = ((val - AUTO_TEMP_MIN_FROM_REG(reg))*10)/(16 - pwm);
|
||||
ret = ((reg & 0xf8) |
|
||||
(range < 10000 ? 0 :
|
||||
range < 20000 ? 1 :
|
||||
|
Loading…
x
Reference in New Issue
Block a user