mirror of https://gitee.com/openkylin/linux.git
hwmon: (hwmon-vid) Fix checkpatch issues
Fixed: ERROR: code indent should use tabs where possible ERROR: space required before the open parenthesis '(' WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Not fixed (url): WARNING: line over 80 characters Not fixed (false positive): ERROR: Macros with complex values should be enclosed in parenthesis Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
3230f7049e
commit
f352df652f
|
@ -83,18 +83,18 @@ int vid_from_reg(int val, u8 vrm)
|
||||||
{
|
{
|
||||||
int vid;
|
int vid;
|
||||||
|
|
||||||
switch(vrm) {
|
switch (vrm) {
|
||||||
|
|
||||||
case 100: /* VRD 10.0 */
|
case 100: /* VRD 10.0 */
|
||||||
/* compute in uV, round to mV */
|
/* compute in uV, round to mV */
|
||||||
val &= 0x3f;
|
val &= 0x3f;
|
||||||
if((val & 0x1f) == 0x1f)
|
if ((val & 0x1f) == 0x1f)
|
||||||
return 0;
|
return 0;
|
||||||
if((val & 0x1f) <= 0x09 || val == 0x0a)
|
if ((val & 0x1f) <= 0x09 || val == 0x0a)
|
||||||
vid = 1087500 - (val & 0x1f) * 25000;
|
vid = 1087500 - (val & 0x1f) * 25000;
|
||||||
else
|
else
|
||||||
vid = 1862500 - (val & 0x1f) * 25000;
|
vid = 1862500 - (val & 0x1f) * 25000;
|
||||||
if(val & 0x20)
|
if (val & 0x20)
|
||||||
vid -= 12500;
|
vid -= 12500;
|
||||||
return (vid + 500) / 1000;
|
return (vid + 500) / 1000;
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ int vid_from_reg(int val, u8 vrm)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(vid_from_reg);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* After this point is the code to automatically determine which
|
* After this point is the code to automatically determine which
|
||||||
|
@ -299,8 +299,6 @@ u8 vid_which_vrm(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXPORT_SYMBOL(vid_from_reg);
|
|
||||||
EXPORT_SYMBOL(vid_which_vrm);
|
EXPORT_SYMBOL(vid_which_vrm);
|
||||||
|
|
||||||
MODULE_AUTHOR("Rudolf Marek <r.marek@assembler.cz>");
|
MODULE_AUTHOR("Rudolf Marek <r.marek@assembler.cz>");
|
||||||
|
|
Loading…
Reference in New Issue