mirror of https://gitee.com/openkylin/linux.git
hwmon: (lm75) fix checkpatch warnings
Fix checkpatch warnings in lm75.h include file Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
This commit is contained in:
parent
66b3b1f757
commit
a01a68472c
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
lm75.h - Part of lm_sensors, Linux kernel modules for hardware
|
lm75.h - Part of lm_sensors, Linux kernel modules for hardware
|
||||||
monitoring
|
monitoring
|
||||||
Copyright (c) 2003 Mark M. Hoffman <mhoffman@lightlink.com>
|
Copyright (c) 2003 Mark M. Hoffman <mhoffman@lightlink.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
static inline u16 LM75_TEMP_TO_REG(long temp)
|
static inline u16 LM75_TEMP_TO_REG(long temp)
|
||||||
{
|
{
|
||||||
int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
|
int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
|
||||||
ntemp += (ntemp<0 ? -250 : 250);
|
ntemp += (ntemp < 0 ? -250 : 250);
|
||||||
return (u16)((ntemp / 500) << 7);
|
return (u16)((ntemp / 500) << 7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,4 +47,3 @@ static inline int LM75_TEMP_FROM_REG(u16 reg)
|
||||||
guarantee arithmetic shift and preserve the sign */
|
guarantee arithmetic shift and preserve the sign */
|
||||||
return ((s16)reg / 128) * 500;
|
return ((s16)reg / 128) * 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue