mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [esmil:visionfive 72/80] drivers/nvdla/nvdla_gem.c:74:3: warning: cast to pointer from integer of different size
@ 2022-01-19  2:50 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-19  2:50 UTC (permalink / raw)
  To: Farzad Farshchi; +Cc: kbuild-all, linux-kernel, Emil Renner Berthing

tree:   https://github.com/esmil/linux visionfive
head:   e46c3a7e373e6faa03399f1a41c29cf7546c37cb
commit: 22c69dadd3685e2d35fb43f4da3bb7fe43f2548c [72/80] nvdla: add NVDLA driver
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220119/202201191052.0lVZjaZf-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/esmil/linux/commit/22c69dadd3685e2d35fb43f4da3bb7fe43f2548c
        git remote add esmil https://github.com/esmil/linux
        git fetch --no-tags esmil visionfive
        git checkout 22c69dadd3685e2d35fb43f4da3bb7fe43f2548c
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/nvdla/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/nvdla/nvdla_gem.c: In function 'nvdla_fill_task_desc':
>> drivers/nvdla/nvdla_gem.c:74:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      74 |   (void __user *)local_task->address_list,
         |   ^


vim +74 drivers/nvdla/nvdla_gem.c

    58	
    59	static int32_t nvdla_fill_task_desc(struct nvdla_ioctl_submit_task *local_task,
    60					struct nvdla_task *task)
    61	{
    62		struct nvdla_mem_handle *handles;
    63	
    64		/* update task desc fields */
    65		task->num_addresses = local_task->num_addresses;
    66	
    67		handles = kzalloc(local_task->num_addresses *
    68					sizeof(struct nvdla_mem_handle), GFP_KERNEL);
    69		if (handles == NULL)
    70			return -EFAULT;
    71	
    72		/* get user addresses list */
    73		if (copy_from_user(handles,
  > 74			(void __user *)local_task->address_list,
    75			(task->num_addresses *
    76				sizeof(struct nvdla_mem_handle)))) {
    77			pr_err("failed to copy address list from user ptr\n");
    78			kfree(handles);
    79			return -EFAULT;
    80		}
    81	
    82		task->address_list = handles;
    83		return 0;
    84	}
    85	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-19  2:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19  2:50 [esmil:visionfive 72/80] drivers/nvdla/nvdla_gem.c:74:3: warning: cast to pointer from integer of different size kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome