Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the following checkpatch warnings and errors: ERROR: do not initialise statics to 0 torvalds#14: FILE: drivers/platform/mips/cpu_hwmon.c:14: +static int csr_temp_enable = 0; WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#60: FILE: drivers/platform/mips/cpu_hwmon.c:60: +static SENSOR_DEVICE_ATTR(name, S_IRUGO, get_hwmon_name, NULL, 0); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#84: FILE: drivers/platform/mips/cpu_hwmon.c:84: +static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, get_cpu_temp, NULL, 1); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#85: FILE: drivers/platform/mips/cpu_hwmon.c:85: +static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, cpu_temp_label, NULL, 1); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#86: FILE: drivers/platform/mips/cpu_hwmon.c:86: +static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, get_cpu_temp, NULL, 2); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#87: FILE: drivers/platform/mips/cpu_hwmon.c:87: +static SENSOR_DEVICE_ATTR(temp2_label, S_IRUGO, cpu_temp_label, NULL, 2); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#88: FILE: drivers/platform/mips/cpu_hwmon.c:88: +static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, get_cpu_temp, NULL, 3); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#89: FILE: drivers/platform/mips/cpu_hwmon.c:89: +static SENSOR_DEVICE_ATTR(temp3_label, S_IRUGO, cpu_temp_label, NULL, 3); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#90: FILE: drivers/platform/mips/cpu_hwmon.c:90: +static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, get_cpu_temp, NULL, 4); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. torvalds#91: FILE: drivers/platform/mips/cpu_hwmon.c:91: +static SENSOR_DEVICE_ATTR(temp4_label, S_IRUGO, cpu_temp_label, NULL, 4); WARNING: Missing a blank line after declarations torvalds#120: FILE: drivers/platform/mips/cpu_hwmon.c:120: + int id = (to_sensor_dev_attr(attr))->index - 1; + return sprintf(buf, "CPU %d Temperature\n", id); WARNING: Missing a blank line after declarations torvalds#128: FILE: drivers/platform/mips/cpu_hwmon.c:128: + int value = loongson3_cpu_temp(id); + return sprintf(buf, "%d\n", value); ERROR: spaces required around that '=' (ctx:VxV) torvalds#135: FILE: drivers/platform/mips/cpu_hwmon.c:135: + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '<' (ctx:VxV) torvalds#135: FILE: drivers/platform/mips/cpu_hwmon.c:135: + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '=' (ctx:VxV) torvalds#145: FILE: drivers/platform/mips/cpu_hwmon.c:145: + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '<' (ctx:VxV) torvalds#145: FILE: drivers/platform/mips/cpu_hwmon.c:145: + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '=' (ctx:VxV) torvalds#156: FILE: drivers/platform/mips/cpu_hwmon.c:156: + for (i=0; i<nr_packages; i++) { ^ ERROR: spaces required around that '<' (ctx:VxV) torvalds#156: FILE: drivers/platform/mips/cpu_hwmon.c:156: + for (i=0; i<nr_packages; i++) { ^ WARNING: line over 80 characters torvalds#175: FILE: drivers/platform/mips/cpu_hwmon.c:175: + csr_temp_enable = csr_readl(LOONGSON_CSR_FEATURES) & LOONGSON_CSRF_TEMP; Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
- Loading branch information