Hi Umesh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-intel/for-linux-next-fixes drm-tip/drm-tip 
linus/master v6.8-rc4 next-20240215]
[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/Umesh-Nerlige-Ramappa/i915-pmu-Add-pmu_teardown-helper/20240214-020605
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
patch link:    
https://lore.kernel.org/r/20240213180302.47266-3-umesh.nerlige.ramappa%40intel.com
patch subject: [PATCH 2/2] i915/pmu: Cleanup pending events on unbind
config: x86_64-randconfig-121-20240214 
(https://download.01.org/0day-ci/archive/20240216/202402160519.aioeunoj-...@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20240216/202402160519.aioeunoj-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202402160519.aioeunoj-...@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/i915_pmu.c:1405:44: sparse: sparse: incorrect type in 
>> initializer (different address spaces) @@     expected struct file *file @@  
>>    got struct file [noderef] __rcu * @@
   drivers/gpu/drm/i915/i915_pmu.c:1405:44: sparse:     expected struct file 
*file
   drivers/gpu/drm/i915/i915_pmu.c:1405:44: sparse:     got struct file 
[noderef] __rcu *
   drivers/gpu/drm/i915/i915_pmu.c: note: in included file (through 
include/linux/preempt.h, include/linux/spinlock.h, include/linux/fdtable.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true

vim +1405 drivers/gpu/drm/i915/i915_pmu.c

  1385  
  1386  static void close_event_file(struct perf_event *event)
  1387  {
  1388          unsigned int max_open_fds, fd;
  1389          struct files_struct *files;
  1390          struct task_struct *task;
  1391          struct fdtable *fdt;
  1392  
  1393          task = event->owner;
  1394          if (!task)
  1395                  return;
  1396  
  1397          files = task->files;
  1398          if (!files)
  1399                  return;
  1400  
  1401          spin_lock(&files->file_lock);
  1402          fdt = files_fdtable(files);
  1403          max_open_fds = __open_files(fdt);
  1404          for (fd = 0; fd < max_open_fds; fd++) {
> 1405                  struct file *file = fdt->fd[fd];
  1406  
  1407                  if (!file || file->private_data != event)
  1408                          continue;
  1409  
  1410                  rcu_assign_pointer(fdt->fd[fd], NULL);
  1411                  __clear_bit(fd, fdt->open_fds);
  1412                  __clear_bit(fd / BITS_PER_LONG, fdt->full_fds_bits);
  1413                  if (fd < files->next_fd)
  1414                          files->next_fd = fd;
  1415                  filp_close(file, files);
  1416                  break;
  1417          }
  1418          spin_unlock(&files->file_lock);
  1419  }
  1420  

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

Reply via email to