Hi Mike,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mst-vhost/linux-next]
[also build test WARNING on tip/x86/core linus/master v5.17-rc2 next-20220203]
[cannot apply to davem-sparc/master]
[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]

url:    
https://github.com/0day-ci/linux/commits/Mike-Christie/Use-copy_process-in-vhost-layer/20220203-050454
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: sparc-randconfig-s032-20220130 
(https://download.01.org/0day-ci/archive/20220203/[email protected]/config)
compiler: sparc-linux-gcc (GCC) 11.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # 
https://github.com/0day-ci/linux/commit/2c7380ae8136c224f4c7074027303b97b0a0f84c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Mike-Christie/Use-copy_process-in-vhost-layer/20220203-050454
        git checkout 2c7380ae8136c224f4c7074027303b97b0a0f84c
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc 
SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


sparse warnings: (new ones prefixed by >>)
>> kernel/vhost_task.c:85:24: sparse: sparse: incorrect type in argument 1 
>> (different base types) @@     expected unsigned int [usertype] size @@     
>> got restricted gfp_t @@
   kernel/vhost_task.c:85:24: sparse:     expected unsigned int [usertype] size
   kernel/vhost_task.c:85:24: sparse:     got restricted gfp_t
>> kernel/vhost_task.c:85:36: sparse: sparse: incorrect type in argument 2 
>> (different base types) @@     expected restricted gfp_t [usertype] flags @@  
>>    got unsigned int @@
   kernel/vhost_task.c:85:36: sparse:     expected restricted gfp_t [usertype] 
flags
   kernel/vhost_task.c:85:36: sparse:     got unsigned int

vim +85 kernel/vhost_task.c

    62  
    63  /**
    64   * vhost_task_create - create a copy of a process to be used by the 
kernel
    65   * @fn: thread stack
    66   * @arg: data to be passed to fn
    67   * @node: numa node to allocate task from
    68   *
    69   * This returns a specialized task for use by the vhost layer or NULL on
    70   * failure. The returned task is inactive, and the caller must fire it 
up
    71   * through vhost_task_start().
    72   */
    73  struct vhost_task *vhost_task_create(int (*fn)(void *), void *arg, int 
node)
    74  {
    75          struct kernel_clone_args args = {
    76                  .flags          = CLONE_FS | CLONE_UNTRACED | CLONE_VM,
    77                  .exit_signal    = 0,
    78                  .stack          = (unsigned long)vhost_task_fn,
    79                  .worker_flags   = USER_WORKER | USER_WORKER_NO_FILES |
    80                                    USER_WORKER_SIG_IGN,
    81          };
    82          struct vhost_task *vtsk;
    83          struct task_struct *tsk;
    84  
  > 85          vtsk = kzalloc(GFP_KERNEL, sizeof(*vtsk));
    86          if (!vtsk)
    87                  return ERR_PTR(-ENOMEM);
    88  
    89          init_completion(&vtsk->exited);
    90          vtsk->data = arg;
    91          vtsk->fn = fn;
    92          args.stack_size =  (unsigned long)vtsk;
    93  
    94          tsk = copy_process(NULL, 0, node, &args);
    95          if (IS_ERR(tsk)) {
    96                  kfree(vtsk);
    97                  return NULL;
    98          }
    99  
   100          vtsk->task = tsk;
   101  
   102          return vtsk;
   103  }
   104  EXPORT_SYMBOL_GPL(vhost_task_create);
   105  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to