Re: [PATCH V3 XRT Alveo 18/18] fpga: xrt: Kconfig and Makefile updates for XRT drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lizhi,

I love your patch! Yet something to improve:

[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.11 next-20210217]
[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/Lizhi-Hou/XRT-Alveo-driver-overview/20210218-151631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 2ab38c17aac10bf55ab3efde4c4db3893d8691d2
config: parisc-randconfig-r025-20210218 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/9069f42b5fcafe471ceb1047ee53983098b2edba
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Lizhi-Hou/XRT-Alveo-driver-overview/20210218-151631
        git checkout 9069f42b5fcafe471ceb1047ee53983098b2edba
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc 

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

All error/warnings (new ones prefixed by >>):

   drivers/fpga/xrt/lib/main.c: In function 'xleaf_register_driver':
>> drivers/fpga/xrt/lib/main.c:144:8: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'? [-Werror=implicit-function-declaration]
     144 |  map = vzalloc(sizeof(*map));
         |        ^~~~~~~
         |        kvzalloc
>> drivers/fpga/xrt/lib/main.c:144:6: warning: assignment to 'struct xrt_drv_map *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     144 |  map = vzalloc(sizeof(*map));
         |      ^
   drivers/fpga/xrt/lib/main.c: In function 'xleaf_unregister_driver':
>> drivers/fpga/xrt/lib/main.c:181:2: error: implicit declaration of function 'vfree'; did you mean 'kvfree'? [-Werror=implicit-function-declaration]
     181 |  vfree(map);
         |  ^~~~~
         |  kvfree
   cc1: some warnings being treated as errors


vim +144 drivers/fpga/xrt/lib/main.c

898da78383bc51 Lizhi Hou 2021-02-17  127  
898da78383bc51 Lizhi Hou 2021-02-17  128  int xleaf_register_driver(enum xrt_subdev_id id,
898da78383bc51 Lizhi Hou 2021-02-17  129  			  struct platform_driver *drv,
898da78383bc51 Lizhi Hou 2021-02-17  130  			  struct xrt_subdev_endpoints *eps)
898da78383bc51 Lizhi Hou 2021-02-17  131  {
898da78383bc51 Lizhi Hou 2021-02-17  132  	struct xrt_drv_map *map;
898da78383bc51 Lizhi Hou 2021-02-17  133  
898da78383bc51 Lizhi Hou 2021-02-17  134  	mutex_lock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  135  
898da78383bc51 Lizhi Hou 2021-02-17  136  	map = xrt_drv_find_map_by_id_nolock(id);
898da78383bc51 Lizhi Hou 2021-02-17  137  	if (map) {
898da78383bc51 Lizhi Hou 2021-02-17  138  		mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  139  		pr_err("Id %d already has a registered driver, 0x%p\n",
898da78383bc51 Lizhi Hou 2021-02-17  140  		       id, map->drv);
898da78383bc51 Lizhi Hou 2021-02-17  141  		return -EEXIST;
898da78383bc51 Lizhi Hou 2021-02-17  142  	}
898da78383bc51 Lizhi Hou 2021-02-17  143  
898da78383bc51 Lizhi Hou 2021-02-17 @144  	map = vzalloc(sizeof(*map));
898da78383bc51 Lizhi Hou 2021-02-17  145  	if (!map) {
898da78383bc51 Lizhi Hou 2021-02-17  146  		mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  147  		return -ENOMEM;
898da78383bc51 Lizhi Hou 2021-02-17  148  	}
898da78383bc51 Lizhi Hou 2021-02-17  149  	map->id = id;
898da78383bc51 Lizhi Hou 2021-02-17  150  	map->drv = drv;
898da78383bc51 Lizhi Hou 2021-02-17  151  	map->eps = eps;
898da78383bc51 Lizhi Hou 2021-02-17  152  
898da78383bc51 Lizhi Hou 2021-02-17  153  	xrt_drv_register_driver(map);
898da78383bc51 Lizhi Hou 2021-02-17  154  
898da78383bc51 Lizhi Hou 2021-02-17  155  	list_add(&map->list, &xrt_drv_maps);
898da78383bc51 Lizhi Hou 2021-02-17  156  
898da78383bc51 Lizhi Hou 2021-02-17  157  	mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  158  
898da78383bc51 Lizhi Hou 2021-02-17  159  	return 0;
898da78383bc51 Lizhi Hou 2021-02-17  160  }
898da78383bc51 Lizhi Hou 2021-02-17  161  EXPORT_SYMBOL_GPL(xleaf_register_driver);
898da78383bc51 Lizhi Hou 2021-02-17  162  
898da78383bc51 Lizhi Hou 2021-02-17  163  void xleaf_unregister_driver(enum xrt_subdev_id id)
898da78383bc51 Lizhi Hou 2021-02-17  164  {
898da78383bc51 Lizhi Hou 2021-02-17  165  	struct xrt_drv_map *map;
898da78383bc51 Lizhi Hou 2021-02-17  166  
898da78383bc51 Lizhi Hou 2021-02-17  167  	mutex_lock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  168  
898da78383bc51 Lizhi Hou 2021-02-17  169  	map = xrt_drv_find_map_by_id_nolock(id);
898da78383bc51 Lizhi Hou 2021-02-17  170  	if (!map) {
898da78383bc51 Lizhi Hou 2021-02-17  171  		mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  172  		pr_err("Id %d has no registered driver\n", id);
898da78383bc51 Lizhi Hou 2021-02-17  173  		return;
898da78383bc51 Lizhi Hou 2021-02-17  174  	}
898da78383bc51 Lizhi Hou 2021-02-17  175  
898da78383bc51 Lizhi Hou 2021-02-17  176  	list_del(&map->list);
898da78383bc51 Lizhi Hou 2021-02-17  177  
898da78383bc51 Lizhi Hou 2021-02-17  178  	mutex_unlock(&xrt_lib_lock);
898da78383bc51 Lizhi Hou 2021-02-17  179  
898da78383bc51 Lizhi Hou 2021-02-17  180  	xrt_drv_unregister_driver(map);
898da78383bc51 Lizhi Hou 2021-02-17 @181  	vfree(map);
898da78383bc51 Lizhi Hou 2021-02-17  182  }
898da78383bc51 Lizhi Hou 2021-02-17  183  EXPORT_SYMBOL_GPL(xleaf_unregister_driver);
898da78383bc51 Lizhi Hou 2021-02-17  184  

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux