summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2020-07-09 06:55:19 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-07-16 11:49:19 +0300
commitf17d3f218d8639ea6195ce2c027f2bd83ed12e30 (patch)
tree4a58907ab2027d1cc31146d039ac790ac299fa54 /samples
parent7a98c066e9094963220760d211f5008eacf878c1 (diff)
downloadlinux-f17d3f218d8639ea6195ce2c027f2bd83ed12e30.tar.xz
MIPS: Loongson: Cleanup cpu_hwmon.c
Fix the following checkpatch warnings and errors: ERROR: do not initialise statics to 0 +static int csr_temp_enable = 0; WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +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'. +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'. +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'. +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'. +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'. +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'. +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'. +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'. +static SENSOR_DEVICE_ATTR(temp4_label, S_IRUGO, cpu_temp_label, NULL, 4); WARNING: Missing a blank line after declarations + int id = (to_sensor_dev_attr(attr))->index - 1; + return sprintf(buf, "CPU %d Temperature\n", id); WARNING: Missing a blank line after declarations + int value = loongson3_cpu_temp(id); + return sprintf(buf, "%d\n", value); ERROR: spaces required around that '=' (ctx:VxV) + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '<' (ctx:VxV) + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '=' (ctx:VxV) + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '<' (ctx:VxV) + for (i=0; i<nr_packages; i++) ^ ERROR: spaces required around that '=' (ctx:VxV) + for (i=0; i<nr_packages; i++) { ^ ERROR: spaces required around that '<' (ctx:VxV) + for (i=0; i<nr_packages; i++) { ^ WARNING: line over 80 characters + csr_temp_enable = csr_readl(LOONGSON_CSR_FEATURES) & LOONGSON_CSRF_TEMP; Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Zhi Li <lizhi01@loongson.cn> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions