[xlnx:master 9559/10513] drivers/fpga/fpga-mgr.c:828:2: error: implicit declaration of function 'set_dma_ops'

kernel test robot lkp at intel.com
Tue Mar 2 17:22:48 GMT 2021


Hi Nava,

FYI, the error/warning still remains.

tree:   https://github.com/Xilinx/linux-xlnx master
head:   11fb963a44f50af56ff7017fe808ff83b3ae4716
commit: ed71785e2c3c3495e89c7b6c3a38699b59bf83d8 [9559/10513] fpga: support loading from a pre-allocated buffer
config: m68k-randconfig-r026-20210302 (attached as .config)
compiler: m68k-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/Xilinx/linux-xlnx/commit/ed71785e2c3c3495e89c7b6c3a38699b59bf83d8
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx master
        git checkout ed71785e2c3c3495e89c7b6c3a38699b59bf83d8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   drivers/fpga/fpga-mgr.c: In function 'fpga_mgr_create':
>> drivers/fpga/fpga-mgr.c:828:2: error: implicit declaration of function 'set_dma_ops' [-Werror=implicit-function-declaration]
     828 |  set_dma_ops(&mgr->dev, get_dma_ops(dev));
         |  ^~~~~~~~~~~
>> drivers/fpga/fpga-mgr.c:828:25: error: implicit declaration of function 'get_dma_ops'; did you mean 'get_dma_buf'? [-Werror=implicit-function-declaration]
     828 |  set_dma_ops(&mgr->dev, get_dma_ops(dev));
         |                         ^~~~~~~~~~~
         |                         get_dma_buf
   cc1: some warnings being treated as errors


vim +/set_dma_ops +828 drivers/fpga/fpga-mgr.c

   773	
   774	/**
   775	 * fpga_mgr_create - create and initialize a FPGA manager struct
   776	 * @dev:	fpga manager device from pdev
   777	 * @name:	fpga manager name
   778	 * @mops:	pointer to structure of fpga manager ops
   779	 * @priv:	fpga manager private data
   780	 *
   781	 * The caller of this function is responsible for freeing the struct with
   782	 * fpga_mgr_free().  Using devm_fpga_mgr_create() instead is recommended.
   783	 *
   784	 * Return: pointer to struct fpga_manager or NULL
   785	 */
   786	struct fpga_manager *fpga_mgr_create(struct device *dev, const char *name,
   787					     const struct fpga_manager_ops *mops,
   788					     void *priv)
   789	{
   790		struct fpga_manager *mgr;
   791		int id, ret;
   792	
   793		if (!mops || !mops->write_complete || !mops->state ||
   794		    !mops->write_init || (!mops->write && !mops->write_sg)) {
   795			dev_err(dev, "Attempt to register without fpga_manager_ops\n");
   796			return NULL;
   797		}
   798	
   799		if (!name || !strlen(name)) {
   800			dev_err(dev, "Attempt to register with no name!\n");
   801			return NULL;
   802		}
   803	
   804		mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
   805		if (!mgr)
   806			return NULL;
   807	
   808		id = ida_simple_get(&fpga_mgr_ida, 0, 0, GFP_KERNEL);
   809		if (id < 0) {
   810			ret = id;
   811			goto error_kfree;
   812		}
   813	
   814		mutex_init(&mgr->ref_mutex);
   815	
   816		mgr->name = name;
   817		mgr->mops = mops;
   818		mgr->priv = priv;
   819	
   820		device_initialize(&mgr->dev);
   821		mgr->dev.class = fpga_mgr_class;
   822		mgr->dev.groups = mops->groups;
   823		mgr->dev.parent = dev;
   824		mgr->dev.of_node = dev->of_node;
   825		mgr->dev.id = id;
   826	
   827		/* Make device dma capable by inheriting from parent's */
 > 828		set_dma_ops(&mgr->dev, get_dma_ops(dev));
   829		ret = dma_coerce_mask_and_coherent(&mgr->dev, dma_get_mask(dev));
   830		if (ret) {
   831			dev_warn(dev,
   832			"Failed to set DMA mask %llx. Trying to continue... %x\n",
   833			dma_get_mask(dev), ret);
   834		}
   835	
   836		ret = dev_set_name(&mgr->dev, "fpga%d", id);
   837		if (ret)
   838			goto error_device;
   839	
   840		mgr->miscdev.minor = MISC_DYNAMIC_MINOR;
   841		mgr->miscdev.name = kobject_name(&mgr->dev.kobj);
   842		mgr->miscdev.fops = &fpga_fops;
   843		ret = misc_register(&mgr->miscdev);
   844		if (ret) {
   845			pr_err("fpga: failed to register misc device.\n");
   846			goto error_device;
   847		}
   848	
   849		return mgr;
   850	
   851	error_device:
   852		ida_simple_remove(&fpga_mgr_ida, id);
   853	error_kfree:
   854		kfree(mgr);
   855	
   856		return NULL;
   857	}
   858	EXPORT_SYMBOL_GPL(fpga_mgr_create);
   859	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 26291 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210303/d056a9e4/attachment-0001.gz>


More information about the linux-arm-kernel mailing list