CC: [email protected] TO: Nava kishore Manne <[email protected]> CC: Michal Simek <[email protected]>
tree: https://github.com/0day-ci/linux/commits/Marek-Vasut/dmaengine-xilinx-Add-empty-device_config-function/20200613-230018 head: f88c4c2d8ab10fec078f00a89e51181e8823c49b commit: ed71785e2c3c3495e89c7b6c3a38699b59bf83d8 [9559/10032] fpga: support loading from a pre-allocated buffer :::::: branch date: 3 hours ago :::::: commit date: 4 months ago config: um-allmodconfig (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce (this is a W=1 build): git checkout ed71785e2c3c3495e89c7b6c3a38699b59bf83d8 # save the attached .config to linux build tree make W=1 ARCH=um If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> All errors (new ones prefixed by >>, old ones prefixed by <<): cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs] In file included from include/linux/file.h:9, from include/linux/dma-buf.h:16, from drivers/fpga/fpga-mgr.c:11: include/asm-generic/fixmap.h: In function 'fix_to_virt': include/asm-generic/fixmap.h:32:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses); | ^~ include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert' 330 | if (!(condition)) | ^~~~~~~~~ include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert' 350 | _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) | ^~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG' 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) | ^~~~~~~~~~~~~~~~ include/asm-generic/fixmap.h:32:2: note: in expansion of macro 'BUILD_BUG_ON' 32 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses); | ^~~~~~~~~~~~ In file included from include/linux/uaccess.h:11, from include/linux/highmem.h:9, from drivers/fpga/fpga-mgr.c:21: arch/um/include/asm/uaccess.h: In function '__access_ok': arch/um/include/asm/uaccess.h:17:29: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 17 | (((unsigned long) (addr) >= FIXADDR_USER_START) && | ^~ arch/um/include/asm/uaccess.h:45:3: note: in expansion of macro '__access_ok_vsyscall' 45 | __access_ok_vsyscall(addr, size) || | ^~~~~~~~~~~~~~~~~~~~ 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 # https://github.com/0day-ci/linux/commit/ed71785e2c3c3495e89c7b6c3a38699b59bf83d8 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout ed71785e2c3c3495e89c7b6c3a38699b59bf83d8 vim +/set_dma_ops +828 drivers/fpga/fpga-mgr.c ebf877a51ad7b6 Alan Tull 2017-11-15 773 6a8c3be7ec8eb3 Alan Tull 2015-10-07 774 /** 7085e2a94f7df5 Alan Tull 2018-05-16 775 * fpga_mgr_create - create and initialize a FPGA manager struct 6a8c3be7ec8eb3 Alan Tull 2015-10-07 776 * @dev: fpga manager device from pdev 6a8c3be7ec8eb3 Alan Tull 2015-10-07 777 * @name: fpga manager name 6a8c3be7ec8eb3 Alan Tull 2015-10-07 778 * @mops: pointer to structure of fpga manager ops 6a8c3be7ec8eb3 Alan Tull 2015-10-07 779 * @priv: fpga manager private data 6a8c3be7ec8eb3 Alan Tull 2015-10-07 780 * 084181fe8cc747 Alan Tull 2018-10-15 781 * The caller of this function is responsible for freeing the struct with 084181fe8cc747 Alan Tull 2018-10-15 782 * fpga_mgr_free(). Using devm_fpga_mgr_create() instead is recommended. 084181fe8cc747 Alan Tull 2018-10-15 783 * 7085e2a94f7df5 Alan Tull 2018-05-16 784 * Return: pointer to struct fpga_manager or NULL 6a8c3be7ec8eb3 Alan Tull 2015-10-07 785 */ 7085e2a94f7df5 Alan Tull 2018-05-16 786 struct fpga_manager *fpga_mgr_create(struct device *dev, const char *name, 6a8c3be7ec8eb3 Alan Tull 2015-10-07 787 const struct fpga_manager_ops *mops, 6a8c3be7ec8eb3 Alan Tull 2015-10-07 788 void *priv) 6a8c3be7ec8eb3 Alan Tull 2015-10-07 789 { 6a8c3be7ec8eb3 Alan Tull 2015-10-07 790 struct fpga_manager *mgr; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 791 int id, ret; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 792 baa6d396635129 Jason Gunthorpe 2017-02-01 793 if (!mops || !mops->write_complete || !mops->state || ed71785e2c3c34 Nava kishore Manne 2020-01-21 794 !mops->write_init || (!mops->write && !mops->write_sg)) { 6a8c3be7ec8eb3 Alan Tull 2015-10-07 795 dev_err(dev, "Attempt to register without fpga_manager_ops\n"); 7085e2a94f7df5 Alan Tull 2018-05-16 796 return NULL; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 797 } 6a8c3be7ec8eb3 Alan Tull 2015-10-07 798 6a8c3be7ec8eb3 Alan Tull 2015-10-07 799 if (!name || !strlen(name)) { 6a8c3be7ec8eb3 Alan Tull 2015-10-07 800 dev_err(dev, "Attempt to register with no name!\n"); 7085e2a94f7df5 Alan Tull 2018-05-16 801 return NULL; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 802 } 6a8c3be7ec8eb3 Alan Tull 2015-10-07 803 6a8c3be7ec8eb3 Alan Tull 2015-10-07 804 mgr = kzalloc(sizeof(*mgr), GFP_KERNEL); 6a8c3be7ec8eb3 Alan Tull 2015-10-07 805 if (!mgr) 7085e2a94f7df5 Alan Tull 2018-05-16 806 return NULL; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 807 6a8c3be7ec8eb3 Alan Tull 2015-10-07 808 id = ida_simple_get(&fpga_mgr_ida, 0, 0, GFP_KERNEL); 6a8c3be7ec8eb3 Alan Tull 2015-10-07 809 if (id < 0) { 6a8c3be7ec8eb3 Alan Tull 2015-10-07 810 ret = id; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 811 goto error_kfree; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 812 } 6a8c3be7ec8eb3 Alan Tull 2015-10-07 813 6a8c3be7ec8eb3 Alan Tull 2015-10-07 814 mutex_init(&mgr->ref_mutex); 6a8c3be7ec8eb3 Alan Tull 2015-10-07 815 6a8c3be7ec8eb3 Alan Tull 2015-10-07 816 mgr->name = name; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 817 mgr->mops = mops; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 818 mgr->priv = priv; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 819 6a8c3be7ec8eb3 Alan Tull 2015-10-07 820 device_initialize(&mgr->dev); 6a8c3be7ec8eb3 Alan Tull 2015-10-07 821 mgr->dev.class = fpga_mgr_class; 845089bbf589be Alan Tull 2017-11-15 822 mgr->dev.groups = mops->groups; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 823 mgr->dev.parent = dev; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 824 mgr->dev.of_node = dev->of_node; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 825 mgr->dev.id = id; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 826 ed71785e2c3c34 Nava kishore Manne 2020-01-21 827 /* Make device dma capable by inheriting from parent's */ ed71785e2c3c34 Nava kishore Manne 2020-01-21 @828 set_dma_ops(&mgr->dev, get_dma_ops(dev)); ed71785e2c3c34 Nava kishore Manne 2020-01-21 829 ret = dma_coerce_mask_and_coherent(&mgr->dev, dma_get_mask(dev)); ed71785e2c3c34 Nava kishore Manne 2020-01-21 830 if (ret) { ed71785e2c3c34 Nava kishore Manne 2020-01-21 831 dev_warn(dev, ed71785e2c3c34 Nava kishore Manne 2020-01-21 832 "Failed to set DMA mask %llx. Trying to continue... %x\n", ed71785e2c3c34 Nava kishore Manne 2020-01-21 833 dma_get_mask(dev), ret); ed71785e2c3c34 Nava kishore Manne 2020-01-21 834 } ed71785e2c3c34 Nava kishore Manne 2020-01-21 835 6a8c3be7ec8eb3 Alan Tull 2015-10-07 836 ret = dev_set_name(&mgr->dev, "fpga%d", id); 07687c031d14a1 Alan Tull 2015-10-29 837 if (ret) 07687c031d14a1 Alan Tull 2015-10-29 838 goto error_device; 6a8c3be7ec8eb3 Alan Tull 2015-10-07 839 ed71785e2c3c34 Nava kishore Manne 2020-01-21 840 mgr->miscdev.minor = MISC_DYNAMIC_MINOR; ed71785e2c3c34 Nava kishore Manne 2020-01-21 841 mgr->miscdev.name = kobject_name(&mgr->dev.kobj); ed71785e2c3c34 Nava kishore Manne 2020-01-21 842 mgr->miscdev.fops = &fpga_fops; ed71785e2c3c34 Nava kishore Manne 2020-01-21 843 ret = misc_register(&mgr->miscdev); ed71785e2c3c34 Nava kishore Manne 2020-01-21 844 if (ret) { ed71785e2c3c34 Nava kishore Manne 2020-01-21 845 pr_err("fpga: failed to register misc device.\n"); ed71785e2c3c34 Nava kishore Manne 2020-01-21 846 goto error_device; ed71785e2c3c34 Nava kishore Manne 2020-01-21 847 } ed71785e2c3c34 Nava kishore Manne 2020-01-21 848 7085e2a94f7df5 Alan Tull 2018-05-16 849 return mgr; 7085e2a94f7df5 Alan Tull 2018-05-16 850 7085e2a94f7df5 Alan Tull 2018-05-16 851 error_device: 7085e2a94f7df5 Alan Tull 2018-05-16 852 ida_simple_remove(&fpga_mgr_ida, id); 7085e2a94f7df5 Alan Tull 2018-05-16 853 error_kfree: 7085e2a94f7df5 Alan Tull 2018-05-16 854 kfree(mgr); 7085e2a94f7df5 Alan Tull 2018-05-16 855 7085e2a94f7df5 Alan Tull 2018-05-16 856 return NULL; 7085e2a94f7df5 Alan Tull 2018-05-16 857 } 7085e2a94f7df5 Alan Tull 2018-05-16 858 EXPORT_SYMBOL_GPL(fpga_mgr_create); 7085e2a94f7df5 Alan Tull 2018-05-16 859 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
