Hi Ekansh,

kernel test robot noticed the following build warnings:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on char-misc/char-misc-next char-misc/char-misc-linus 
linus/master v6.12-rc2 next-20241008]
[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/Ekansh-Gupta/misc-fastrpc-Add-CRC-support-using-invokeV2-request/20241007-164734
base:   char-misc/char-misc-testing
patch link:    
https://lore.kernel.org/r/20241007084518.3649876-2-quic_ekangupt%40quicinc.com
patch subject: [PATCH v1 1/4] misc: fastrpc: Add CRC support using invokeV2 
request
config: alpha-randconfig-r112-20241008 
(https://download.01.org/0day-ci/archive/20241009/202410090402.lospefvz-...@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.0
reproduce: 
(https://download.01.org/0day-ci/archive/20241009/202410090402.lospefvz-...@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/202410090402.lospefvz-...@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/misc/fastrpc.c:1696:19: sparse: sparse: incorrect type in assignment 
>> (different base types) @@     expected unsigned long long [usertype] args @@ 
>>     got struct fastrpc_invoke_args *[assigned] args @@
   drivers/misc/fastrpc.c:1696:19: sparse:     expected unsigned long long 
[usertype] args
   drivers/misc/fastrpc.c:1696:19: sparse:     got struct fastrpc_invoke_args 
*[assigned] args
>> drivers/misc/fastrpc.c:1716:18: sparse: sparse: incorrect type in argument 1 
>> (different base types) @@     expected void const *objp @@     got unsigned 
>> long long [addressable] [usertype] args @@
   drivers/misc/fastrpc.c:1716:18: sparse:     expected void const *objp
   drivers/misc/fastrpc.c:1716:18: sparse:     got unsigned long long 
[addressable] [usertype] args
   drivers/misc/fastrpc.c:1734:23: sparse: sparse: incorrect type in argument 1 
(different base types) @@     expected void const *objp @@     got unsigned 
long long [addressable] [usertype] args @@
   drivers/misc/fastrpc.c:1734:23: sparse:     expected void const *objp
   drivers/misc/fastrpc.c:1734:23: sparse:     got unsigned long long 
[addressable] [usertype] args
   drivers/misc/fastrpc.c: note: in included file (through 
include/linux/swait.h, include/linux/completion.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates 
to true

vim +1696 drivers/misc/fastrpc.c

  1677  
  1678  static int fastrpc_copy_args(struct fastrpc_invoke *inv)
  1679  {
  1680          struct fastrpc_invoke_args *args = NULL;
  1681          u32 nscalars;
  1682  
  1683          /* nscalars is truncated here to max supported value */
  1684          nscalars = REMOTE_SCALARS_LENGTH(inv->sc);
  1685          if (nscalars) {
  1686                  args = kcalloc(nscalars, sizeof(*args), GFP_KERNEL);
  1687                  if (!args)
  1688                          return -ENOMEM;
  1689  
  1690                  if (copy_from_user(args, (void __user 
*)(uintptr_t)inv->args,
  1691                                     nscalars * sizeof(*args))) {
  1692                          kfree(args);
  1693                          return -EFAULT;
  1694                  }
  1695          }
> 1696          inv->args = args;
  1697  
  1698          return 0;
  1699  }
  1700  
  1701  static int fastrpc_invoke(struct fastrpc_user *fl, char __user *argp)
  1702  {
  1703          struct fastrpc_invoke_v2 ioctl = {0};
  1704          struct fastrpc_invoke inv;
  1705          int err;
  1706  
  1707          if (copy_from_user(&inv, argp, sizeof(inv)))
  1708                  return -EFAULT;
  1709  
  1710          err = fastrpc_copy_args(&inv);
  1711          if (err)
  1712                  return err;
  1713  
  1714          ioctl.inv = inv;
  1715          err = fastrpc_internal_invoke(fl, false, &ioctl);
> 1716          kfree(inv.args);
  1717  
  1718          return err;
  1719  }
  1720  

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

Reply via email to