[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201704010939.nw8hzTDi%fengguang.wu@intel.com>
Date: Sat, 1 Apr 2017 09:33:40 +0800
From: kbuild test robot <lkp@...el.com>
To: Wu Hao <hao.wu@...el.com>
Cc: kbuild-all@...org, atull@...nel.org, moritz.fischer@...us.com,
linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org,
luwei.kang@...el.com, yi.z.zhang@...el.com, hao.wu@...el.com,
Tim Whisonant <tim.whisonant@...el.com>,
Enno Luebbers <enno.luebbers@...el.com>,
Shiva Rao <shiva.rao@...el.com>,
Christopher Rauer <christopher.rauer@...el.com>,
Xiao Guangrong <guangrong.xiao@...ux.intel.com>
Subject: Re: [PATCH 16/16] fpga: intel: afu: add FPGA_PORT_DMA_MAP/UNMAP
ioctls support
Hi Wu,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.11-rc4 next-20170331]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Wu-Hao/Intel-FPGA-Device-Drivers/20170401-052017
config: sparc-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc
All warnings (new ones prefixed by >>):
drivers/fpga/intel/afu-dma-region.c: In function 'afu_dma_map_region':
>> drivers/fpga/intel/afu-dma-region.c:291:31: warning: passing argument 2 of 'access_ok' makes pointer from integer without a cast [-Wint-conversion]
if (!access_ok(VERIFY_WRITE, user_addr, length))
^~~~~~~~~
In file included from arch/sparc/include/asm/uaccess.h:4:0,
from include/linux/uaccess.h:5,
from drivers/fpga/intel/afu-dma-region.c:17:
arch/sparc/include/asm/uaccess_64.h:80:19: note: expected 'const void *' but argument is of type 'u64 {aka long long unsigned int}'
static inline int access_ok(int type, const void __user * addr, unsigned long size)
^~~~~~~~~
vim +/access_ok +291 drivers/fpga/intel/afu-dma-region.c
275 u64 user_addr, u64 length, u64 *iova)
276 {
277 struct fpga_afu_dma_region *region;
278 int ret;
279
280 /*
281 * Check Inputs, only accept page-aligned user memory region with
282 * valid length.
283 */
284 if (!PAGE_ALIGNED(user_addr) || !PAGE_ALIGNED(length) || !length)
285 return -EINVAL;
286
287 /* Check overflow */
288 if (user_addr + length < user_addr)
289 return -EINVAL;
290
> 291 if (!access_ok(VERIFY_WRITE, user_addr, length))
292 return -EINVAL;
293
294 region = kzalloc(sizeof(*region), GFP_KERNEL);
295 if (!region)
296 return -ENOMEM;
297
298 region->user_addr = user_addr;
299 region->length = length;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (49802 bytes)
Powered by blists - more mailing lists