Hi Steven,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/locking/core]
[also build test WARNING on trace/for-next akpm-mm/mm-everything linus/master 
v7.0-rc3 next-20260310]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Steven-Rostedt/tracing-Have-futex-syscall-trace-event-show-specific-user-data/20260311-041422
base:   tip/locking/core
patch link:    https://lore.kernel.org/r/20260310201036.542627924%40kernel.org
patch subject: [PATCH v2 1/3] tracing: Have futex syscall trace event show 
specific user data
config: x86_64-rhel-9.4 
(https://download.01.org/0day-ci/archive/20260311/[email protected]/config)
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/20260311/[email protected]/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 <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

   kernel/trace/trace_syscalls.c: In function 'syscall_get_futex':
>> kernel/trace/trace_syscalls.c:807:15: warning: variable 'buf' set but not 
>> used [-Wunused-but-set-variable]
     807 |         char *buf;
         |               ^~~


vim +/buf +807 kernel/trace/trace_syscalls.c

   801  
   802  static int
   803  syscall_get_futex(unsigned long *args, char **buffer, int *size, int 
buf_size)
   804  {
   805          struct syscall_user_buffer *sbuf;
   806          const char __user *ptr;
 > 807          char *buf;
   808  
   809          /* buf_size of zero means user doesn't want user space read */
   810          if (!buf_size)
   811                  return -1;
   812  
   813          /* If the syscall_buffer is NULL, tracing is being shutdown */
   814          sbuf = READ_ONCE(syscall_buffer);
   815          if (!sbuf)
   816                  return -1;
   817  
   818          ptr = (char __user *)args[0];
   819  
   820          *buffer = trace_user_fault_read(&sbuf->buf, ptr, 4, NULL, NULL);
   821          if (!*buffer)
   822                  return -1;
   823  
   824          /* Add room for the value */
   825          *size += 4;
   826  
   827          buf = *buffer;
   828  
   829          return 0;
   830  }
   831  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to