From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [xlnx:xlnx_rebase_v5.4 864/1760] drivers/fpga/fpga-mgr.c:828:2: error: implicit declaration of function 'set_dma_ops'
Date: Thu, 27 May 2021 21:20:11 +0800 [thread overview]
Message-ID: <202105272103.2S8uMpGS-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6657 bytes --]
Hi Nava,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 971e12809eee20685e4d8f6a4ecf466acac3e278
commit: 1a0c556193a3d81ff6bde4c571c38b2c19bbb443 [864/1760] fpga: support loading from a pre-allocated buffer
config: um-randconfig-r025-20210526 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/1a0c556193a3d81ff6bde4c571c38b2c19bbb443
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout 1a0c556193a3d81ff6bde4c571c38b2c19bbb443
# 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 <lkp@intel.com>
All errors (new 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
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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 12133 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Nava kishore Manne <nava.manne@xilinx.com>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>
Subject: [xlnx:xlnx_rebase_v5.4 864/1760] drivers/fpga/fpga-mgr.c:828:2: error: implicit declaration of function 'set_dma_ops'
Date: Thu, 27 May 2021 21:20:11 +0800 [thread overview]
Message-ID: <202105272103.2S8uMpGS-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6496 bytes --]
Hi Nava,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: 971e12809eee20685e4d8f6a4ecf466acac3e278
commit: 1a0c556193a3d81ff6bde4c571c38b2c19bbb443 [864/1760] fpga: support loading from a pre-allocated buffer
config: um-randconfig-r025-20210526 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/1a0c556193a3d81ff6bde4c571c38b2c19bbb443
git remote add xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xlnx xlnx_rebase_v5.4
git checkout 1a0c556193a3d81ff6bde4c571c38b2c19bbb443
# 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 <lkp@intel.com>
All errors (new 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
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12133 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-05-27 13:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 13:20 kernel test robot [this message]
2021-05-27 13:20 ` [xlnx:xlnx_rebase_v5.4 864/1760] drivers/fpga/fpga-mgr.c:828:2: error: implicit declaration of function 'set_dma_ops' kernel test robot
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=202105272103.2S8uMpGS-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.