[openeuler:OLK-6.6 3541/3541] drivers/cpuinspect/sysfs.c:98:9: warning: no previous prototype for 'cpu_utility_show'
Hi Yu, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: cd9eb9b4365b71652b2c2ac58293bea47c9f9302 commit: d91c6db8ca896824da23aab69dde9ce289222299 [3541/3541] cpuinspect: add CPU-inspect infrastructure config: x86_64-randconfig-r122-20251213 (https://download.01.org/0day-ci/archive/20251213/202512130602.wgKjB7EZ-lkp@i...) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251213/202512130602.wgKjB7EZ-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512130602.wgKjB7EZ-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/cpuinspect/sysfs.c:92:9: warning: no previous prototype for 'patrol_complete_show' [-Wmissing-prototypes] 92 | ssize_t patrol_complete_show(struct device *dev, struct device_attribute *attr, | ^~~~~~~~~~~~~~~~~~~~
drivers/cpuinspect/sysfs.c:98:9: warning: no previous prototype for 'cpu_utility_show' [-Wmissing-prototypes] 98 | ssize_t cpu_utility_show(struct device *dev, struct device_attribute *attr, | ^~~~~~~~~~~~~~~~ drivers/cpuinspect/sysfs.c:104:9: warning: no previous prototype for 'cpu_utility_store' [-Wmissing-prototypes] 104 | ssize_t cpu_utility_store(struct device *dev, struct device_attribute *attr, | ^~~~~~~~~~~~~~~~~ drivers/cpuinspect/sysfs.c:117:9: warning: no previous prototype for 'patrol_times_show' [-Wmissing-prototypes] 117 | ssize_t patrol_times_show(struct device *dev, struct device_attribute *attr, | ^~~~~~~~~~~~~~~~~ drivers/cpuinspect/sysfs.c:123:9: warning: no previous prototype for 'patrol_times_store' [-Wmissing-prototypes] 123 | ssize_t patrol_times_store(struct device *dev, struct device_attribute *attr, | ^~~~~~~~~~~~~~~~~~ drivers/cpuinspect/sysfs.c:139:9: warning: no previous prototype for 'start_patrol_store' [-Wmissing-prototypes] 139 | ssize_t start_patrol_store(struct device *dev, struct device_attribute *attr, | ^~~~~~~~~~~~~~~~~~
vim +/cpu_utility_show +98 drivers/cpuinspect/sysfs.c 97
98 ssize_t cpu_utility_show(struct device *dev, struct device_attribute *attr, 99 char *buf) 100 { 101 return sprintf(buf, "%u\n", ci_core.cpu_utility); 102 } 103 104 ssize_t cpu_utility_store(struct device *dev, struct device_attribute *attr, 105 const char *buf, size_t size) 106 { 107 unsigned int cpu_util; 108 109 if (kstrtouint(buf, 10, &cpu_util) || cpu_util < 1 || cpu_util > 100) 110 return -EINVAL; 111 112 ci_core.cpu_utility = cpu_util; 113 114 return size; 115 } 116 117 ssize_t patrol_times_show(struct device *dev, struct device_attribute *attr, 118 char *buf) 119 { 120 return sprintf(buf, "%lu\n", ci_core.inspect_times); 121 } 122 123 ssize_t patrol_times_store(struct device *dev, struct device_attribute *attr, 124 const char *buf, size_t size) 125 { 126 /* 127 * It is not allowed to modify patrol times during the CPU 128 * inspection operation. 129 */ 130 if (ci_core.inspect_on) 131 return -EBUSY; 132 133 if (kstrtoul(buf, 10, &ci_core.inspect_times)) 134 return -EINVAL; 135 136 return size; 137 } 138 139 ssize_t start_patrol_store(struct device *dev, struct device_attribute *attr, 140 const char *buf, size_t size) 141 { 142 bool start_patrol = false; 143 144 if (strtobool(buf, &start_patrol) < 0) 145 return -EINVAL; 146 147 if (!mutex_trylock(&cpuinspect_lock)) 148 return -EBUSY; 149 150 /* 151 * It is not allowed to start the inspection again during the 152 * inspection process. 153 */ 154 if (start_patrol && (int) start_patrol == ci_core.inspect_on) { 155 mutex_unlock(&cpuinspect_lock); 156 return -EBUSY; 157 } 158 159 if (start_patrol == 0) 160 stop_inspect_threads(); 161 else if (curr_cpu_inspector) 162 start_inspect_threads(); 163 164 mutex_unlock(&cpuinspect_lock); 165 return size; 166 } 167
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot