lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202210110857.1VKOqXQ0-lkp@intel.com>
Date:   Tue, 11 Oct 2022 08:30:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jason Gunthorpe <jgg@...dia.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Alex Williamson <alex.williamson@...hat.com>,
        Eric Auger <eric.auger@...hat.com>
Subject: drivers/misc/uacce/uacce.c:397:48: error: 'IOMMU_DEV_FEAT_IOPF'
 undeclared; did you mean 'IOMMU_DEV_FEAT_SVA'?

Hi Jason,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4de65c5830233e7a4adf2e679510089ec4e210c7
commit: 179209fa12709a3df8888c323b37315da2683c24 vfio: IOMMU_API should be selected
date:   1 year, 7 months ago
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce:
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=179209fa12709a3df8888c323b37315da2683c24
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 179209fa12709a3df8888c323b37315da2683c24
        make O=/tmp/kselftest headers
        make O=/tmp/kselftest -C tools/testing/selftests

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   fs/ufs/inode.c:397: warning: Function parameter or member 'bh_result' not described in 'ufs_getfrag_block'
   fs/ufs/inode.c:397: warning: Function parameter or member 'create' not described in 'ufs_getfrag_block'
   lib/decompress_unxz.c:251:17: warning: no previous prototype for 'unxz' [-Wmissing-prototypes]
     251 | STATIC int INIT unxz(unsigned char *in, long in_size,
         |                 ^~~~
   drivers/regulator/twl-regulator.c:559:34: warning: 'twl_of_match' defined but not used [-Wunused-const-variable=]
     559 | static const struct of_device_id twl_of_match[] = {
         |                                  ^~~~~~~~~~~~
   In file included from fs/efs/dir.c:9:
   fs/efs/efs.h:22:19: warning: 'cprt' defined but not used [-Wunused-const-variable=]
      22 | static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@...chi.ch.eu.org>";
         |                   ^~~~
   drivers/nvdimm/dimm_devs.c:373:16: warning: no previous prototype for 'security_show' [-Wmissing-prototypes]
     373 | __weak ssize_t security_show(struct device *dev,
         |                ^~~~~~~~~~~~~
   In file included from fs/efs/file.c:11:
   fs/efs/efs.h:22:19: warning: 'cprt' defined but not used [-Wunused-const-variable=]
      22 | static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@...chi.ch.eu.org>";
         |                   ^~~~
   drivers/regulator/twl6030-regulator.c:637:34: warning: 'twl_of_match' defined but not used [-Wunused-const-variable=]
     637 | static const struct of_device_id twl_of_match[] = {
         |                                  ^~~~~~~~~~~~
   fs/ntfs/compress.c:22: warning: Incorrect use of kernel-doc format:  * ntfs_compression_constants - enum of constants used in the compression code
   fs/ntfs/compress.c:24: warning: cannot understand function prototype: 'typedef enum '
   fs/ntfs/compress.c:47: warning: cannot understand function prototype: 'u8 *ntfs_compression_buffer; '
   fs/ntfs/compress.c:52: warning: Function parameter or member 'ntfs_cb_lock' not described in 'DEFINE_SPINLOCK'
   fs/ntfs/compress.c:52: warning: expecting prototype for ntfs_cb_lock(). Prototype was for DEFINE_SPINLOCK() instead
   fs/ntfs/compress.c:88: warning: Function parameter or member 'page' not described in 'zero_partial_compressed_page'
   fs/ntfs/compress.c:88: warning: Function parameter or member 'initialized_size' not described in 'zero_partial_compressed_page'
   fs/ntfs/compress.c:107: warning: Function parameter or member 'page' not described in 'handle_bounds_compressed_page'
   fs/ntfs/compress.c:107: warning: Function parameter or member 'i_size' not described in 'handle_bounds_compressed_page'
   fs/ntfs/compress.c:107: warning: Function parameter or member 'initialized_size' not described in 'handle_bounds_compressed_page'
   In file included from fs/efs/symlink.c:13:
   fs/efs/efs.h:22:19: warning: 'cprt' defined but not used [-Wunused-const-variable=]
      22 | static const char cprt[] = "EFS: "EFS_VERSION" - (c) 1999 Al Smith <Al.Smith@...chi.ch.eu.org>";
         |                   ^~~~
   fs/ntfs/dir.c:21: warning: Incorrect use of kernel-doc format:  * The little endian Unicode string $I30 as a global constant.
   fs/ntfs/dir.c:23: warning: cannot understand function prototype: 'ntfschar I30[5] = '
   fs/ntfs/dir.c:1489: warning: Function parameter or member 'start' not described in 'ntfs_dir_fsync'
   fs/ntfs/dir.c:1489: warning: Function parameter or member 'end' not described in 'ntfs_dir_fsync'
   fs/ntfs/dir.c:1489: warning: Excess function parameter 'dentry' description in 'ntfs_dir_fsync'
   drivers/nvdimm/dimm_devs.c:63: warning: Function parameter or member 'ndd' not described in 'nvdimm_init_nsarea'
   drivers/nvdimm/dimm_devs.c:63: warning: Excess function parameter 'nvdimm' description in 'nvdimm_init_nsarea'
   drivers/nvdimm/dimm_devs.c:819: warning: Function parameter or member 'nd_region' not described in 'nd_blk_available_dpa'
   drivers/nvdimm/dimm_devs.c:819: warning: Excess function parameter 'nd_mapping' description in 'nd_blk_available_dpa'
   drivers/nvdimm/dimm_devs.c:1006: warning: Function parameter or member 'ndd' not described in 'nvdimm_allocated_dpa'
   drivers/nvdimm/dimm_devs.c:1006: warning: Excess function parameter 'nvdimm' description in 'nvdimm_allocated_dpa'
   fs/ntfs/file.c:1956: warning: Function parameter or member 'start' not described in 'ntfs_file_fsync'
   fs/ntfs/file.c:1956: warning: Function parameter or member 'end' not described in 'ntfs_file_fsync'
   fs/ntfs/inode.c:31: warning: Incorrect use of kernel-doc format:  * ntfs_test_inode - compare two (possibly fake) inodes for equality
   fs/ntfs/inode.c:47: warning: Function parameter or member 'vi' not described in 'ntfs_test_inode'
   fs/ntfs/inode.c:47: warning: Function parameter or member 'data' not described in 'ntfs_test_inode'
   fs/ntfs/inode.c:47: warning: expecting prototype for inode.c(). Prototype was for ntfs_test_inode() instead
   fs/ntfs/inode.c:2945: warning: expecting prototype for ntfs_write_inode(). Prototype was for __ntfs_write_inode() instead
   drivers/nvdimm/region_devs.c:1204: warning: expecting prototype for nvdimm_flush(). Prototype was for generic_nvdimm_flush() instead
   fs/ntfs/namei.c:263: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Inode operations for directories.
   fs/ntfs/namei.c:368: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Export operations allowing NFS exporting of mounted NTFS partitions.
   fs/ntfs/mft.c:24: warning: expecting prototype for mft.c - NTFS kernel mft record operations. Part of the Linux(). Prototype was for MAX_BHS() instead
   fs/ntfs/runlist.c:16: warning: Incorrect use of kernel-doc format:  * ntfs_rl_mm - runlist memmove
   fs/ntfs/runlist.c:22: warning: Function parameter or member 'base' not described in 'ntfs_rl_mm'
   fs/ntfs/runlist.c:22: warning: Function parameter or member 'dst' not described in 'ntfs_rl_mm'
   fs/ntfs/runlist.c:22: warning: Function parameter or member 'src' not described in 'ntfs_rl_mm'
   fs/ntfs/runlist.c:22: warning: Function parameter or member 'size' not described in 'ntfs_rl_mm'
   fs/ntfs/runlist.c:22: warning: expecting prototype for runlist.c - NTFS runlist handling code.  Part of the Linux(). Prototype was for ntfs_rl_mm() instead
   fs/ntfs/runlist.c:35: warning: Function parameter or member 'dstbase' not described in 'ntfs_rl_mc'
   fs/ntfs/runlist.c:35: warning: Function parameter or member 'dst' not described in 'ntfs_rl_mc'
   fs/ntfs/runlist.c:35: warning: Function parameter or member 'srcbase' not described in 'ntfs_rl_mc'
   fs/ntfs/runlist.c:35: warning: Function parameter or member 'src' not described in 'ntfs_rl_mc'
   fs/ntfs/runlist.c:35: warning: Function parameter or member 'size' not described in 'ntfs_rl_mc'
   drivers/nvdimm/badrange.c:271: warning: Function parameter or member 'nd_region' not described in 'nvdimm_badblocks_populate'
   drivers/nvdimm/badrange.c:271: warning: Function parameter or member 'range' not described in 'nvdimm_badblocks_populate'
   drivers/nvdimm/badrange.c:271: warning: Excess function parameter 'region' description in 'nvdimm_badblocks_populate'
   drivers/nvdimm/badrange.c:271: warning: Excess function parameter 'res' description in 'nvdimm_badblocks_populate'
   drivers/nvdimm/namespace_devs.c:1945: warning: Function parameter or member 'nd_mapping' not described in 'create_namespace_pmem'
   drivers/nvdimm/namespace_devs.c:1945: warning: Excess function parameter 'nspm' description in 'create_namespace_pmem'
   drivers/misc/genwqe/card_base.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * IBM Accelerator Family 'GenWQE'
   fs/ntfs/super.c:66: warning: Function parameter or member 's' not described in 'simple_getbool'
   fs/ntfs/super.c:66: warning: Function parameter or member 'setval' not described in 'simple_getbool'
   fs/ntfs/super.c:1204: warning: Function parameter or member 'rp' not described in 'load_and_check_logfile'
   fs/ntfs/super.c:2660: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * The complete super operations.
   drivers/nvdimm/security.c:416:6: warning: no previous prototype for '__nvdimm_security_overwrite_query' [-Wmissing-prototypes]
     416 | void __nvdimm_security_overwrite_query(struct nvdimm *nvdimm)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   fs/ntfs/unistr.c:87: warning: Function parameter or member 'name1_len' not described in 'ntfs_collate_names'
   fs/ntfs/unistr.c:87: warning: Function parameter or member 'name2_len' not described in 'ntfs_collate_names'
   drivers/gpu/drm/vkms/vkms_composer.c:93: warning: Function parameter or member 'xrgb_src' not described in 'x_blend'
   drivers/gpu/drm/vkms/vkms_composer.c:93: warning: Function parameter or member 'xrgb_dst' not described in 'x_blend'
   lib/radix-tree.c:288:6: warning: no previous prototype for 'radix_tree_node_rcu_free' [-Wmissing-prototypes]
     288 | void radix_tree_node_rcu_free(struct rcu_head *head)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~
   drivers/misc/genwqe/card_utils.c:162: warning: expecting prototype for genwqe_init_crc32(). Prototype was for CRC32_POLYNOMIAL() instead
   fs/fuse/dev.c:212: warning: Function parameter or member 'fiq' not described in 'fuse_dev_wake_and_unlock'
   fs/fuse/dev.c:212: warning: expecting prototype for A new request is available, wake fiq(). Prototype was for fuse_dev_wake_and_unlock() instead
   fs/fuse/dir.c:140: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Mark the attributes as stale due to an atime change.  Avoid the invalidate if
   drivers/misc/uacce/uacce.c: In function 'uacce_enable_sva':
>> drivers/misc/uacce/uacce.c:397:48: error: 'IOMMU_DEV_FEAT_IOPF' undeclared (first use in this function); did you mean 'IOMMU_DEV_FEAT_SVA'?
     397 |         ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_IOPF);
         |                                                ^~~~~~~~~~~~~~~~~~~
         |                                                IOMMU_DEV_FEAT_SVA
   drivers/misc/uacce/uacce.c:397:48: note: each undeclared identifier is reported only once for each function it appears in
   drivers/misc/uacce/uacce.c: In function 'uacce_disable_sva':
   drivers/misc/uacce/uacce.c:419:50: error: 'IOMMU_DEV_FEAT_IOPF' undeclared (first use in this function); did you mean 'IOMMU_DEV_FEAT_SVA'?
     419 |         iommu_dev_disable_feature(uacce->parent, IOMMU_DEV_FEAT_IOPF);
         |                                                  ^~~~~~~~~~~~~~~~~~~
         |                                                  IOMMU_DEV_FEAT_SVA
   make[3]: *** [scripts/Makefile.build:277: drivers/misc/uacce/uacce.o] Error 1
   make[3]: Target '__build' not remade because of errors.
   make[2]: *** [scripts/Makefile.build:540: drivers/misc/uacce] Error 2
   fs/overlayfs/util.c:728: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Caller must hold a reference to inode to prevent it from being freed while
   drivers/base/module.c: In function 'module_add_driver':
   drivers/base/module.c:36:13: warning: variable 'no_warn' set but not used [-Wunused-but-set-variable]
      36 |         int no_warn;
         |             ^~~~~~~
   fs/overlayfs/super.c:310: warning: Function parameter or member 'dentry' not described in 'ovl_statfs'
   fs/overlayfs/super.c:310: warning: Excess function parameter 'sb' description in 'ovl_statfs'
   fs/overlayfs/super.c:356: warning: Function parameter or member 'm' not described in 'ovl_show_options'
   fs/overlayfs/super.c:356: warning: Function parameter or member 'dentry' not described in 'ovl_show_options'
   fs/fuse/file.c:647: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * In case of short read, the caller sets 'pos' to the position of
   lib/vsprintf.c: In function 'va_format':
   lib/vsprintf.c:1694:9: warning: function 'va_format' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
    1694 |         buf += vsnprintf(buf, end > buf ? end - buf : 0, va_fmt->fmt, va);
         |         ^~~
   drivers/base/platform-msi.c:461: warning: Function parameter or member 'domain' not described in 'device_msi_free_irqs'
   drivers/base/platform-msi.c:494: warning: Function parameter or member 'domain' not described in 'device_msi_alloc_irqs'
   drivers/base/platform-msi.c:558: warning: Function parameter or member 'fn' not described in 'device_msi_create_irq_domain'
   drivers/base/platform-msi.c:558: warning: expecting prototype for device_msi_create_msi_irq_domain(). Prototype was for device_msi_create_irq_domain() instead
   lib/win_minmax.c:31: warning: Function parameter or member 'm' not described in 'minmax_subwin_update'
   lib/win_minmax.c:31: warning: Function parameter or member 'win' not described in 'minmax_subwin_update'
   lib/win_minmax.c:31: warning: Function parameter or member 'val' not described in 'minmax_subwin_update'
   lib/win_minmax.c:31: warning: expecting prototype for lib/minmax.c(). Prototype was for minmax_subwin_update() instead
   drivers/message/fusion/mptbase.c: In function 'mpt_do_ioc_recovery':
   drivers/message/fusion/mptbase.c:2302:18: warning: variable 'a' set but not used [-Wunused-but-set-variable]
    2302 |         u8      *a;
         |                  ^
   drivers/message/fusion/mptbase.c: In function 'mpt_adapter_dispose':
   drivers/message/fusion/mptbase.c:2818:23: warning: variable 'sz_last' set but not used [-Wunused-but-set-variable]
    2818 |         int sz_first, sz_last;
         |                       ^~~~~~~
   drivers/message/fusion/mptbase.c:2818:13: warning: variable 'sz_first' set but not used [-Wunused-but-set-variable]
    2818 |         int sz_first, sz_last;
         |             ^~~~~~~~
   drivers/message/fusion/mptbase.c: In function 'mpt_diag_reset':
   drivers/message/fusion/mptbase.c:3965:13: warning: variable 'diag1val' set but not used [-Wunused-but-set-variable]
    3965 |         u32 diag1val = 0;
         |             ^~~~~~~~
   drivers/message/fusion/mptbase.c: In function 'mpt_SoftResetHandler':
   drivers/message/fusion/mptbase.c:6952:26: warning: variable 'time_count' set but not used [-Wunused-but-set-variable]
    6952 |         unsigned long    time_count;
         |                          ^~~~~~~~~~
   drivers/message/fusion/mptbase.c: In function 'mpt_HardResetHandler':
   drivers/message/fusion/mptbase.c:7121:26: warning: variable 'time_count' set but not used [-Wunused-but-set-variable]
    7121 |         unsigned long    time_count;
         |                          ^~~~~~~~~~
   In file included from fs/orangefs/protocol.h:287,
                    from fs/orangefs/file.c:13:
   fs/orangefs/orangefs-debug.h:86:18: warning: 'num_kmod_keyword_mask_map' defined but not used [-Wunused-const-variable=]
      86 | static const int num_kmod_keyword_mask_map = (int)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from fs/orangefs/protocol.h:287,
                    from fs/orangefs/acl.c:8:
   fs/orangefs/orangefs-debug.h:86:18: warning: 'num_kmod_keyword_mask_map' defined but not used [-Wunused-const-variable=]
      86 | static const int num_kmod_keyword_mask_map = (int)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from fs/orangefs/protocol.h:287,
                    from fs/orangefs/orangefs-cache.c:8:
   fs/orangefs/orangefs-debug.h:86:18: warning: 'num_kmod_keyword_mask_map' defined but not used [-Wunused-const-variable=]
      86 | static const int num_kmod_keyword_mask_map = (int)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from fs/orangefs/protocol.h:287,
                    from fs/orangefs/orangefs-utils.c:9:
   fs/orangefs/orangefs-debug.h:86:18: warning: 'num_kmod_keyword_mask_map' defined but not used [-Wunused-const-variable=]
      86 | static const int num_kmod_keyword_mask_map = (int)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   fs/fuse/cuse.c:272: warning: expecting prototype for cuse_parse_dev_info(). Prototype was for cuse_parse_devinfo() instead
   fs/fuse/cuse.c:319: warning: Function parameter or member 'fm' not described in 'cuse_process_init_reply'
   fs/fuse/cuse.c:319: warning: Function parameter or member 'args' not described in 'cuse_process_init_reply'
   fs/fuse/cuse.c:319: warning: Function parameter or member 'error' not described in 'cuse_process_init_reply'
   In file included from fs/orangefs/protocol.h:287,
                    from fs/orangefs/xattr.c:13:
   fs/orangefs/orangefs-debug.h:86:18: warning: 'num_kmod_keyword_mask_map' defined but not used [-Wunused-const-variable=]
      86 | static const int num_kmod_keyword_mask_map = (int)
         |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/message/fusion/mptscsih.c: In function 'mptscsih_flush_running_cmds':
   drivers/message/fusion/mptscsih.c:1036:35: warning: variable 'id' set but not used [-Wunused-but-set-variable]
    1036 |         int              channel, id;
         |                                   ^~
   drivers/message/fusion/mptscsih.c:1036:26: warning: variable 'channel' set but not used [-Wunused-but-set-variable]
    1036 |         int              channel, id;
         |                          ^~~~~~~
   drivers/message/fusion/mptscsih.c: In function 'mptscsih_report_queue_full':
   drivers/message/fusion/mptscsih.c:1148:26: warning: variable 'ioc' set but not used [-Wunused-but-set-variable]
    1148 |         MPT_ADAPTER     *ioc;
         |                          ^~~
   drivers/message/fusion/mptscsih.c: In function 'mptscsih_remove':


vim +397 drivers/misc/uacce/uacce.c

015d239ac0142a Kenneth Lee           2020-02-11  387  
015d239ac0142a Kenneth Lee           2020-02-11  388  /**
015d239ac0142a Kenneth Lee           2020-02-11  389   * uacce_alloc() - alloc an accelerator
015d239ac0142a Kenneth Lee           2020-02-11  390   * @parent: pointer of uacce parent device
015d239ac0142a Kenneth Lee           2020-02-11  391   * @interface: pointer of uacce_interface for register
015d239ac0142a Kenneth Lee           2020-02-11  392   *
015d239ac0142a Kenneth Lee           2020-02-11  393   * Returns uacce pointer if success and ERR_PTR if not
015d239ac0142a Kenneth Lee           2020-02-11  394   * Need check returned negotiated uacce->flags
015d239ac0142a Kenneth Lee           2020-02-11  395   */
015d239ac0142a Kenneth Lee           2020-02-11  396  struct uacce_device *uacce_alloc(struct device *parent,
015d239ac0142a Kenneth Lee           2020-02-11 @397  				 struct uacce_interface *interface)
015d239ac0142a Kenneth Lee           2020-02-11  398  {
015d239ac0142a Kenneth Lee           2020-02-11  399  	unsigned int flags = interface->flags;
015d239ac0142a Kenneth Lee           2020-02-11  400  	struct uacce_device *uacce;
015d239ac0142a Kenneth Lee           2020-02-11  401  	int ret;
015d239ac0142a Kenneth Lee           2020-02-11  402  
015d239ac0142a Kenneth Lee           2020-02-11  403  	uacce = kzalloc(sizeof(struct uacce_device), GFP_KERNEL);
015d239ac0142a Kenneth Lee           2020-02-11  404  	if (!uacce)
015d239ac0142a Kenneth Lee           2020-02-11  405  		return ERR_PTR(-ENOMEM);
015d239ac0142a Kenneth Lee           2020-02-11  406  
015d239ac0142a Kenneth Lee           2020-02-11  407  	if (flags & UACCE_DEV_SVA) {
015d239ac0142a Kenneth Lee           2020-02-11  408  		ret = iommu_dev_enable_feature(parent, IOMMU_DEV_FEAT_SVA);
015d239ac0142a Kenneth Lee           2020-02-11  409  		if (ret)
015d239ac0142a Kenneth Lee           2020-02-11  410  			flags &= ~UACCE_DEV_SVA;
015d239ac0142a Kenneth Lee           2020-02-11  411  	}
015d239ac0142a Kenneth Lee           2020-02-11  412  
015d239ac0142a Kenneth Lee           2020-02-11  413  	uacce->parent = parent;
015d239ac0142a Kenneth Lee           2020-02-11  414  	uacce->flags = flags;
015d239ac0142a Kenneth Lee           2020-02-11  415  	uacce->ops = interface->ops;
015d239ac0142a Kenneth Lee           2020-02-11  416  
015d239ac0142a Kenneth Lee           2020-02-11  417  	ret = xa_alloc(&uacce_xa, &uacce->dev_id, uacce, xa_limit_32b,
015d239ac0142a Kenneth Lee           2020-02-11  418  		       GFP_KERNEL);
015d239ac0142a Kenneth Lee           2020-02-11  419  	if (ret < 0)
015d239ac0142a Kenneth Lee           2020-02-11  420  		goto err_with_uacce;
015d239ac0142a Kenneth Lee           2020-02-11  421  
fb01562e5a8a73 Jean-Philippe Brucker 2020-04-23  422  	INIT_LIST_HEAD(&uacce->queues);
fb01562e5a8a73 Jean-Philippe Brucker 2020-04-23  423  	mutex_init(&uacce->queues_lock);
015d239ac0142a Kenneth Lee           2020-02-11  424  	device_initialize(&uacce->dev);
015d239ac0142a Kenneth Lee           2020-02-11  425  	uacce->dev.devt = MKDEV(MAJOR(uacce_devt), uacce->dev_id);
015d239ac0142a Kenneth Lee           2020-02-11  426  	uacce->dev.class = uacce_class;
015d239ac0142a Kenneth Lee           2020-02-11  427  	uacce->dev.groups = uacce_dev_groups;
015d239ac0142a Kenneth Lee           2020-02-11  428  	uacce->dev.parent = uacce->parent;
015d239ac0142a Kenneth Lee           2020-02-11  429  	uacce->dev.release = uacce_release;
015d239ac0142a Kenneth Lee           2020-02-11  430  	dev_set_name(&uacce->dev, "%s-%d", interface->name, uacce->dev_id);
015d239ac0142a Kenneth Lee           2020-02-11  431  
015d239ac0142a Kenneth Lee           2020-02-11  432  	return uacce;
015d239ac0142a Kenneth Lee           2020-02-11  433  
015d239ac0142a Kenneth Lee           2020-02-11  434  err_with_uacce:
015d239ac0142a Kenneth Lee           2020-02-11  435  	if (flags & UACCE_DEV_SVA)
015d239ac0142a Kenneth Lee           2020-02-11  436  		iommu_dev_disable_feature(uacce->parent, IOMMU_DEV_FEAT_SVA);
015d239ac0142a Kenneth Lee           2020-02-11  437  	kfree(uacce);
015d239ac0142a Kenneth Lee           2020-02-11  438  	return ERR_PTR(ret);
015d239ac0142a Kenneth Lee           2020-02-11  439  }
015d239ac0142a Kenneth Lee           2020-02-11  440  EXPORT_SYMBOL_GPL(uacce_alloc);
015d239ac0142a Kenneth Lee           2020-02-11  441  

:::::: The code at line 397 was first introduced by commit
:::::: 015d239ac0142ad0e26567fd890ef8d171f13709 uacce: add uacce driver

:::::: TO: Kenneth Lee <liguozhu@...ilicon.com>
:::::: CC: Herbert Xu <herbert@...dor.apana.org.au>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (148408 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ