[trace:ring-buffer/core 36/39] kernel/trace/trace.c:8213:37: error: too few arguments to function call, expected 5, have 3

kernel test robot
2024-03-20T01:12:56Z

tree: git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace ring-buffer/core
head: cd2b873508a4c85a2993ca58c97688029344fb56
commit: b5ec004e0e8d0b169d92e1fff21d79a3f11c17a8 [36/39] tracing: Allow user-space mapping of the ring-buffer
config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240320/202403200922.BIKcOxkG-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240320/202403200922.BIKcOxkG-lkp@intel.com/reproduce)

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/202403200922.BIKcOxkG-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/trace/trace.c:8213:37: error: too few arguments to function call, expected 5, have 3
8211 | err = ring_buffer_wait(iter->array_buffer->buffer,
| ~~~~~~~~~~~~~~~~
8212 | iter->cpu_file,
8213 | iter->tr->buffer_percent);
| ^
include/linux/ring_buffer.h:104:5: note: 'ring_buffer_wait' declared here
104 | int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full,
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
105 | ring_buffer_cond_fn cond, void *data);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

vim +8213 kernel/trace/trace.c

8202
8203 static long tracing_buffers_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
8204 {
8205 struct ftrace_buffer_info *info = file->private_data;
8206 struct trace_iterator *iter = &info->iter;
8207 int err;
8208
8209 if (cmd == TRACE_MMAP_IOCTL_GET_READER) {
8210 if (!(file->f_flags & O_NONBLOCK)) {
8211 err = ring_buffer_wait(iter->array_buffer->buffer,
8212 iter->cpu_file,
> 8213 iter->tr->buffer_percent);
8214 if (err)
8215 return err;
8216 }
8217
8218 return ring_buffer_map_get_reader(iter->array_buffer->buffer,
8219 iter->cpu_file);
8220 } else if (cmd) {
8221 return -ENOTTY;
8222 }
8223
8224 /*
8225 * An ioctl call with cmd 0 to the ring buffer file will wake up all
8226 * waiters
8227 */
8228 mutex_lock(&trace_types_lock);
8229
8230 /* Make sure the waiters see the new wait_index */
8231 (void)atomic_fetch_inc_release(&iter->wait_index);
8232
8233 ring_buffer_wake_waiters(iter->array_buffer->buffer, iter->cpu_file);
8234
8235 mutex_unlock(&trace_types_lock);
8236 return 0;
8237 }
8238

--
0-DAY CI Kernel Test Service