mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Farzad Farshchi <farzadfr@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Emil Renner Berthing <kernel@esmil.dk>
Subject: [esmil:visionfive 72/80] drivers/nvdla/nvdla_gem.c:74:3: warning: cast to pointer from integer of different size
Date: Wed, 19 Jan 2022 10:50:27 +0800	[thread overview]
Message-ID: <202201191052.0lVZjaZf-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-01-19  2:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202201191052.0lVZjaZf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=farzadfr@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kernel@esmil.dk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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