[xlnx:master 98/137] drivers/misc/xilinx-ai-engine/ai-engine-dev.c:507:16: error: redefinition of 'aie_partition_request'
kernel test robot
lkp at intel.com
Tue Aug 11 15:16:35 EDT 2020
Hi Wendy,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx master
head: 566441779cdc25e377c2baab9277342b09b4249b
commit: eb3512d6a32d517e5f7deff8a5ed51ffb0640908 [98/137] misc: xilinx-ai-engine: Add extern functions to request AI engine partition
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
git checkout eb3512d6a32d517e5f7deff8a5ed51ffb0640908
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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/misc/xilinx-ai-engine/ai-engine-dev.c:507:16: error: redefinition of 'aie_partition_request'
507 | struct device *aie_partition_request(struct aie_partition_req *req)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/xilinx-ai-engine/ai-engine-dev.c:24:
include/linux/xlnx-ai-engine.h:24:1: note: previous definition of 'aie_partition_request' was here
24 | aie_partition_request(struct aie_partition_req *req)
| ^~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/xilinx-ai-engine/ai-engine-dev.c:541:5: error: redefinition of 'aie_partition_get_fd'
541 | int aie_partition_get_fd(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/xilinx-ai-engine/ai-engine-dev.c:24:
include/linux/xlnx-ai-engine.h:29:19: note: previous definition of 'aie_partition_get_fd' was here
29 | static inline int aie_partition_get_fd(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/misc/xilinx-ai-engine/ai-engine-dev.c:565:6: error: redefinition of 'aie_partition_release'
565 | void aie_partition_release(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/xilinx-ai-engine/ai-engine-dev.c:24:
include/linux/xlnx-ai-engine.h:34:20: note: previous definition of 'aie_partition_release' was here
34 | static inline void aie_partition_release(struct device *dev) {}
| ^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/xilinx-ai-engine/ai-engine-dev.c:17:
include/linux/module.h:128:42: error: redefinition of '__inittest'
128 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/device.h:1903:1: note: in expansion of macro 'module_init'
1903 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:238:2: note: in expansion of macro 'module_driver'
238 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:605:1: note: in expansion of macro 'module_platform_driver'
605 | module_platform_driver(xilinx_ai_engine_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:128:42: note: previous definition of '__inittest' was here
128 | static inline initcall_t __maybe_unused __inittest(void) \
| ^~~~~~~~~~
include/linux/module.h:111:32: note: in expansion of macro 'module_init'
111 | #define postcore_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:596:1: note: in expansion of macro 'postcore_initcall'
596 | postcore_initcall(xilinx_ai_engine_init);
| ^~~~~~~~~~~~~~~~~
include/linux/module.h:130:6: error: redefinition of 'init_module'
130 | int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
include/linux/device.h:1903:1: note: in expansion of macro 'module_init'
1903 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/platform_device.h:238:2: note: in expansion of macro 'module_driver'
238 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:605:1: note: in expansion of macro 'module_platform_driver'
605 | module_platform_driver(xilinx_ai_engine_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:130:6: note: previous definition of 'init_module' was here
130 | int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
include/linux/module.h:111:32: note: in expansion of macro 'module_init'
111 | #define postcore_initcall(fn) module_init(fn)
| ^~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:596:1: note: in expansion of macro 'postcore_initcall'
596 | postcore_initcall(xilinx_ai_engine_init);
| ^~~~~~~~~~~~~~~~~
include/linux/module.h:134:42: error: redefinition of '__exittest'
134 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~~~~~
include/linux/device.h:1908:1: note: in expansion of macro 'module_exit'
1908 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/platform_device.h:238:2: note: in expansion of macro 'module_driver'
238 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:605:1: note: in expansion of macro 'module_platform_driver'
605 | module_platform_driver(xilinx_ai_engine_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:134:42: note: previous definition of '__exittest' was here
134 | static inline exitcall_t __maybe_unused __exittest(void) \
| ^~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:603:1: note: in expansion of macro 'module_exit'
603 | module_exit(xilinx_ai_engine_exit);
| ^~~~~~~~~~~
include/linux/module.h:136:7: error: redefinition of 'cleanup_module'
136 | void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
include/linux/device.h:1908:1: note: in expansion of macro 'module_exit'
1908 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/platform_device.h:238:2: note: in expansion of macro 'module_driver'
238 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:605:1: note: in expansion of macro 'module_platform_driver'
605 | module_platform_driver(xilinx_ai_engine_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:136:7: note: previous definition of 'cleanup_module' was here
136 | void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
drivers/misc/xilinx-ai-engine/ai-engine-dev.c:603:1: note: in expansion of macro 'module_exit'
603 | module_exit(xilinx_ai_engine_exit);
| ^~~~~~~~~~~
vim +/aie_partition_request +507 drivers/misc/xilinx-ai-engine/ai-engine-dev.c
495
496 /**
497 * aie_partition_request() - Request an AI engine partition
498 * @req: AI engine partition requesting arguments
499 * @return: pointer to the AI engine partition device, error value for failure.
500 *
501 * This function looks up the AI engine class devices to find the AI engine
502 * partition whose partition ID matches the given partition ID in @req. If
503 * the partition can be found, it will try to request it. It will get a file
504 * for the requested AI engine partition. User can only use the AI engine
505 * partition after it is successfully requested.
506 */
> 507 struct device *aie_partition_request(struct aie_partition_req *req)
508 {
509 struct aie_partition *apart;
510 int ret;
511
512 if (!req)
513 return ERR_PTR(-EINVAL);
514
515 apart = aie_class_find_partition_from_id(req->partition_id);
516 if (!apart)
517 return ERR_PTR(-ENODEV);
518
519 ret = mutex_lock_interruptible(&apart->mlock);
520 if (ret)
521 return ERR_PTR(ret);
522
523 ret = aie_partition_get(apart, req);
524 mutex_unlock(&apart->mlock);
525 if (ret)
526 return ERR_PTR(ret);
527
528 return &apart->dev;
529 }
530 EXPORT_SYMBOL_GPL(aie_partition_request);
531
532 /**
533 * aie_partition_get_fd() - get AI engine partition file descriptor
534 * @dev: AI engine partition device pointer
535 * @return: file descriptor for the AI engine partition for success, and
536 * negative value for failure.
537 *
538 * This function allocate a file descriptor for the AI engine requested
539 * partition, and increase the reference count to the AI engine partition file.
540 */
> 541 int aie_partition_get_fd(struct device *dev)
542 {
543 struct aie_partition *apart;
544 int ret;
545
546 if (!dev)
547 return -EINVAL;
548
549 apart = dev_to_aiepart(dev);
550
551 ret = aie_partition_fd(apart);
552 if (ret < 0)
553 return ret;
554
555 get_file(apart->filep);
556
557 return ret;
558 }
559 EXPORT_SYMBOL_GPL(aie_partition_get_fd);
560
561 /**
562 * aie_partition_release() - Recrease refcount of the AI engine partition
563 * @dev: AI engine partition device
564 */
> 565 void aie_partition_release(struct device *dev)
566 {
567 struct aie_partition *apart;
568
569 if (WARN_ON(!dev))
570 return;
571
572 apart = dev_to_aiepart(dev);
573 fput(apart->filep);
574 }
575 EXPORT_SYMBOL_GPL(aie_partition_release);
576
---
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: 52988 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200812/a994d9b6/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list