mailweb.openeuler.org
Manage this list

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

Kernel

Threads by month
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
kernel@openeuler.org

  • 29 participants
  • 21632 discussions
[openeuler:OLK-5.10 3382/3382] drivers/irqchip/irq-gic-v3.c:829:30: warning: 'xint_proc_ops' defined but not used
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 06a8b520851290347ca458d4335bebc607fe3b58 commit: a05426a568e457640f58698c8ebd636fcde4d202 [3382/3382] arm64: Introduce Xint software solution config: arm64-randconfig-r122-20251205 (https://download.01.org/0day-ci/archive/20251206/202512061109.moN53LxE-lkp@…) compiler: aarch64-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512061109.moN53LxE-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512061109.moN53LxE-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/irqchip/irq-gic-v3.c:829:30: warning: 'xint_proc_ops' defined but not used [-Wunused-const-variable=] static const struct proc_ops xint_proc_ops = { ^~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PCI_IOV Depends on [n]: PCI [=n] Selected by [y]: - CRYPTO_DEV_HISI_MIGRATION [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 [=y] && ACPI [=y] sparse warnings: (new ones prefixed by >>) >> kernel/softirq.c:352:6: sparse: sparse: symbol 'xint_enter_rcu' was not declared. Should it be static? vim +/xint_proc_ops +829 drivers/irqchip/irq-gic-v3.c 828 > 829 static const struct proc_ops xint_proc_ops = { 830 .proc_open = xint_proc_open, 831 .proc_read = seq_read, 832 .proc_lseek = seq_lseek, 833 .proc_release = single_release, 834 .proc_write = xint_proc_write, 835 }; 836 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3482/3482] include/linux/pgplib.h:36:23: error: field has incomplete type 'enum pgp_key_version'
by kernel test robot 06 Dec '25

06 Dec '25
Hi David, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4b48fa45408a2757255bdd0c640c1f693b424fe4 commit: 43d4042e06d2bf96adf67d25e8d91653507a4cf9 [3482/3482] KEYS: Provide a function to load keys from a PGP keyring blob config: x86_64-randconfig-r112-20251206 (https://download.01.org/0day-ci/archive/20251206/202512060959.9M5bsM4J-lkp@…) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060959.9M5bsM4J-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060959.9M5bsM4J-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from crypto/asymmetric_keys/pgp_preload.c:19: >> include/linux/pgplib.h:26:15: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 26 | enum pgp_packet_tag type, | ^ >> include/linux/pgplib.h:36:23: error: field has incomplete type 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ include/linux/pgplib.h:36:7: note: forward declaration of 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ >> include/linux/pgplib.h:37:23: error: field has incomplete type 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ include/linux/pgplib.h:37:7: note: forward declaration of 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ >> crypto/asymmetric_keys/pgp_preload.c:63:10: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 63 | enum pgp_packet_tag type, u8 headerlen, | ^ >> crypto/asymmetric_keys/pgp_preload.c:63:25: error: variable has incomplete type 'enum pgp_packet_tag' 63 | enum pgp_packet_tag type, u8 headerlen, | ^ crypto/asymmetric_keys/pgp_preload.c:63:10: note: forward declaration of 'enum pgp_packet_tag' 63 | enum pgp_packet_tag type, u8 headerlen, | ^ >> crypto/asymmetric_keys/pgp_preload.c:107:36: error: use of undeclared identifier 'PGP_PKT_PUBLIC_KEY' 107 | ctx.pgp.types_of_interest = (1 << PGP_PKT_PUBLIC_KEY); | ^ >> crypto/asymmetric_keys/pgp_preload.c:108:25: error: incompatible function pointer types assigning to 'int (*)(struct pgp_parse_context *, enum pgp_packet_tag, u8, const u8 *, size_t)' (aka 'int (*)(struct pgp_parse_context *, enum pgp_packet_tag, unsigned char, const unsigned char *, unsigned long)') from 'int (struct pgp_parse_context *, enum pgp_packet_tag, u8, const u8 *, size_t)' (aka 'int (struct pgp_parse_context *, enum pgp_packet_tag, unsigned char, const unsigned char *, unsigned long)') [-Wincompatible-function-pointer-types] 108 | ctx.pgp.process_packet = found_pgp_key; | ^ ~~~~~~~~~~~~~ >> crypto/asymmetric_keys/pgp_preload.c:101:12: warning: no previous prototype for function 'preload_pgp_keys' [-Wmissing-prototypes] 101 | int __init preload_pgp_keys(const u8 *pgpdata, size_t pgpdatalen, | ^ crypto/asymmetric_keys/pgp_preload.c:101:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 101 | int __init preload_pgp_keys(const u8 *pgpdata, size_t pgpdatalen, | ^ | static 3 warnings and 5 errors generated. -- In file included from crypto/asymmetric_keys/pgp_public_key.c:19: In file included from include/linux/mpi.h:21: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2193: include/linux/vmstat.h:508:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 508 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 509 | item]; | ~~~~ include/linux/vmstat.h:515:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 515 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 516 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ include/linux/vmstat.h:527:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 527 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 528 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ include/linux/vmstat.h:536:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion] 536 | return vmstat_text[NR_VM_ZONE_STAT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~ ^ 537 | NR_VM_NUMA_EVENT_ITEMS + | ~~~~~~~~~~~~~~~~~~~~~~ In file included from crypto/asymmetric_keys/pgp_public_key.c:20: >> include/linux/pgplib.h:26:15: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 26 | enum pgp_packet_tag type, | ^ >> include/linux/pgplib.h:36:23: error: field has incomplete type 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ include/linux/pgplib.h:36:7: note: forward declaration of 'enum pgp_key_version' 36 | enum pgp_key_version version : 8; | ^ >> include/linux/pgplib.h:37:23: error: field has incomplete type 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ include/linux/pgplib.h:37:7: note: forward declaration of 'enum pgp_pubkey_algo' 37 | enum pgp_pubkey_algo pubkey_algo : 8; | ^ >> crypto/asymmetric_keys/pgp_public_key.c:63:2: error: call to undeclared function 'kenter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 63 | kenter(""); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:65:22: error: use of undeclared identifier 'PGP_KEY_VERSION_4' 65 | n = (pgp->version < PGP_KEY_VERSION_4) ? 8 : 6; | ^ >> crypto/asymmetric_keys/pgp_public_key.c:67:9: error: call to undeclared function 'mpi_key_length'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 67 | ret = mpi_key_length(key_ptr, keylen, nb + i, nn + i); | ^ crypto/asymmetric_keys/pgp_public_key.c:95:21: error: use of undeclared identifier 'PGP_KEY_VERSION_4' 95 | if (pgp->version < PGP_KEY_VERSION_4) { | ^ >> crypto/asymmetric_keys/pgp_public_key.c:115:2: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 115 | kleave(" = %d", ret); | ^ crypto/asymmetric_keys/pgp_public_key.c:134:42: error: use of undeclared identifier 'PGP_KEY_VERSION_4' 134 | tfm = crypto_alloc_shash(pgp->version < PGP_KEY_VERSION_4 ? | ^ crypto/asymmetric_keys/pgp_public_key.c:191:2: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 191 | kleave(" = %d", ret); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:199:12: warning: declaration of 'enum pgp_packet_tag' will not be visible outside of this function [-Wvisibility] 199 | enum pgp_packet_tag type, | ^ >> crypto/asymmetric_keys/pgp_public_key.c:199:27: error: variable has incomplete type 'enum pgp_packet_tag' 199 | enum pgp_packet_tag type, | ^ crypto/asymmetric_keys/pgp_public_key.c:199:12: note: forward declaration of 'enum pgp_packet_tag' 199 | enum pgp_packet_tag type, | ^ crypto/asymmetric_keys/pgp_public_key.c:211:2: error: call to undeclared function 'kenter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 211 | kenter(",%u,%u,,%zu", type, headerlen, datalen); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:213:14: error: use of undeclared identifier 'PGP_PKT_USER_ID' 213 | if (type == PGP_PKT_USER_ID) { | ^ crypto/asymmetric_keys/pgp_public_key.c:216:3: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 216 | kleave(" = 0 [user ID]"); | ^ crypto/asymmetric_keys/pgp_public_key.c:221:3: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 221 | kleave(" = -ENOKEY [already]"); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:234:25: error: use of undeclared identifier 'PGP_PUBKEY__LAST' 234 | if (pgp.pubkey_algo >= PGP_PUBKEY__LAST) | ^ >> crypto/asymmetric_keys/pgp_public_key.c:236:9: error: use of undeclared identifier 'pgp_to_public_key_algo' 236 | algo = pgp_to_public_key_algo[pgp.pubkey_algo]; | ^ crypto/asymmetric_keys/pgp_public_key.c:252:2: error: call to undeclared function 'kleave'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 252 | kleave(" = 0 [use]"); | ^ crypto/asymmetric_keys/pgp_public_key.c:310:2: error: call to undeclared function 'kenter'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 310 | kenter(""); | ^ >> crypto/asymmetric_keys/pgp_public_key.c:313:36: error: use of undeclared identifier 'PGP_PKT_PUBLIC_KEY' 313 | ctx.pgp.types_of_interest = (1 << PGP_PKT_PUBLIC_KEY) | | ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 7 warnings and 20 errors generated. Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_KEY_PARSER Depends on [m]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] && ASYMMETRIC_PUBLIC_KEY_SUBTYPE [=m] Selected by [y]: - PGP_PRELOAD [=y] && CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=y] vim +36 include/linux/pgplib.h b78af6579e15dc David Howells 2023-09-12 19 b78af6579e15dc David Howells 2023-09-12 20 /* b78af6579e15dc David Howells 2023-09-12 21 * PGP library packet parser b78af6579e15dc David Howells 2023-09-12 22 */ b78af6579e15dc David Howells 2023-09-12 23 struct pgp_parse_context { b78af6579e15dc David Howells 2023-09-12 24 u64 types_of_interest; b78af6579e15dc David Howells 2023-09-12 25 int (*process_packet)(struct pgp_parse_context *context, b78af6579e15dc David Howells 2023-09-12 @26 enum pgp_packet_tag type, b78af6579e15dc David Howells 2023-09-12 27 u8 headerlen, b78af6579e15dc David Howells 2023-09-12 28 const u8 *data, b78af6579e15dc David Howells 2023-09-12 29 size_t datalen); b78af6579e15dc David Howells 2023-09-12 30 }; b78af6579e15dc David Howells 2023-09-12 31 b78af6579e15dc David Howells 2023-09-12 32 extern int pgp_parse_packets(const u8 *data, size_t datalen, b78af6579e15dc David Howells 2023-09-12 33 struct pgp_parse_context *ctx); b78af6579e15dc David Howells 2023-09-12 34 b78af6579e15dc David Howells 2023-09-12 35 struct pgp_parse_pubkey { b78af6579e15dc David Howells 2023-09-12 @36 enum pgp_key_version version : 8; b78af6579e15dc David Howells 2023-09-12 @37 enum pgp_pubkey_algo pubkey_algo : 8; b78af6579e15dc David Howells 2023-09-12 38 __kernel_old_time_t creation_time; b78af6579e15dc David Howells 2023-09-12 39 __kernel_old_time_t expires_at; b78af6579e15dc David Howells 2023-09-12 40 }; b78af6579e15dc David Howells 2023-09-12 41 :::::: The code at line 36 was first introduced by commit :::::: b78af6579e15dcdff86504da90af77f3e890270e PGPLIB: Basic packet parser :::::: TO: David Howells <dhowells(a)redhat.com> :::::: CC: zgzxx <zhangguangzhi3(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3479/3479] drivers/ub/urma/ubcore/ubcore_tp.c:42:5: warning: no previous prototype for 'ubcore_set_tp_attr'
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4b48fa45408a2757255bdd0c640c1f693b424fe4 commit: 48c0dc7e6efc81a43d09cc96efcd43f68c0ed145 [3479/3479] urma: added functions for getting and setting TP attribute fields. config: arm64-randconfig-r061-20251205 (https://download.01.org/0day-ci/archive/20251206/202512060607.MyfYJLh0-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060607.MyfYJLh0-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060607.MyfYJLh0-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/ub/urma/ubcore/ubcore_tp.c:16:5: warning: no previous prototype for 'ubcore_get_tp_list' [-Wmissing-prototypes] 16 | int ubcore_get_tp_list(struct ubcore_device *dev, struct ubcore_get_tp_cfg *cfg, | ^~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_tp.c:42:5: warning: no previous prototype for 'ubcore_set_tp_attr' [-Wmissing-prototypes] 42 | int ubcore_set_tp_attr(struct ubcore_device *dev, const uint64_t tp_handle, | ^~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_tp.c:65:5: warning: no previous prototype for 'ubcore_get_tp_attr' [-Wmissing-prototypes] 65 | int ubcore_get_tp_attr(struct ubcore_device *dev, const uint64_t tp_handle, | ^~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] vim +/ubcore_set_tp_attr +42 drivers/ub/urma/ubcore/ubcore_tp.c 41 > 42 int ubcore_set_tp_attr(struct ubcore_device *dev, const uint64_t tp_handle, 43 const uint8_t tp_attr_cnt, const uint32_t tp_attr_bitmap, 44 const struct ubcore_tp_attr_value *tp_attr, 45 struct ubcore_udata *udata) 46 { 47 int ret; 48 49 if (dev == NULL || dev->ops == NULL || dev->ops->set_tp_attr == NULL || 50 tp_attr == NULL) { 51 ubcore_log_err("Invalid parameter.\n"); 52 return -EINVAL; 53 } 54 55 ret = dev->ops->set_tp_attr(dev, tp_handle, tp_attr_cnt, tp_attr_bitmap, 56 tp_attr, udata); 57 if (ret != 0) 58 ubcore_log_err("Failed to set tp attributions, ret: %d.\n", 59 ret); 60 61 return ret; 62 } 63 EXPORT_SYMBOL(ubcore_set_tp_attr); 64 > 65 int ubcore_get_tp_attr(struct ubcore_device *dev, const uint64_t tp_handle, -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 3382/3382] drivers/crypto/hisilicon/migration/acc_vf_migration.c:1622:43: error: 'struct pci_dev' has no member named 'sriov'
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 06a8b520851290347ca458d4335bebc607fe3b58 commit: f1fd3a9b0bfc6f7da507ee6f9a32398c962281a6 [3382/3382] vfio/migration: Modify the vf id acquisition method config: arm64-randconfig-r122-20251205 (https://download.01.org/0day-ci/archive/20251206/202512060558.eWAtEGfZ-lkp@…) compiler: aarch64-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060558.eWAtEGfZ-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060558.eWAtEGfZ-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from drivers/crypto/hisilicon/migration/acc_vf_migration.c:11: include/linux/pci.h: In function 'pci_physfn': include/linux/pci.h:546:14: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'? dev = dev->physfn; ^~~~~~ is_physfn drivers/crypto/hisilicon/migration/acc_vf_migration.c: In function 'vf_qm_pci_init': drivers/crypto/hisilicon/migration/acc_vf_migration.c:1535:8: error: implicit declaration of function 'pci_request_mem_regions'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration] ret = pci_request_mem_regions(pdev, vfqm->dev_name); ^~~~~~~~~~~~~~~~~~~~~~~ pci_request_regions drivers/crypto/hisilicon/migration/acc_vf_migration.c:1571:2: error: implicit declaration of function 'pci_release_mem_regions'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration] pci_release_mem_regions(pdev); ^~~~~~~~~~~~~~~~~~~~~~~ pci_release_regions drivers/crypto/hisilicon/migration/acc_vf_migration.c: In function 'hisi_acc_get_vf_id': >> drivers/crypto/hisilicon/migration/acc_vf_migration.c:1622:43: error: 'struct pci_dev' has no member named 'sriov' ((pf->bus->number << 8) + pf->devfn + pf->sriov->offset)) / ^~ drivers/crypto/hisilicon/migration/acc_vf_migration.c:1623:11: error: 'struct pci_dev' has no member named 'sriov' pf->sriov->stride; ^~ drivers/crypto/hisilicon/migration/acc_vf_migration.c: In function 'acc_vf_probe': drivers/crypto/hisilicon/migration/acc_vf_migration.c:1633:17: error: 'struct pci_dev' has no member named 'physfn'; did you mean 'is_physfn'? pf_dev = pdev->physfn; ^~~~~~ is_physfn drivers/crypto/hisilicon/migration/acc_vf_migration.c: In function 'hisi_acc_get_vf_id': >> drivers/crypto/hisilicon/migration/acc_vf_migration.c:1624:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PCI_IOV Depends on [n]: PCI [=n] Selected by [y]: - CRYPTO_DEV_HISI_MIGRATION [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 [=y] && ACPI [=y] vim +1622 drivers/crypto/hisilicon/migration/acc_vf_migration.c 1612 1613 static int hisi_acc_get_vf_id(struct pci_dev *dev) 1614 { 1615 struct pci_dev *pf; 1616 1617 if (!dev->is_virtfn) 1618 return -EINVAL; 1619 1620 pf = pci_physfn(dev); 1621 return (((dev->bus->number << 8) + dev->devfn) - > 1622 ((pf->bus->number << 8) + pf->devfn + pf->sriov->offset)) / 1623 pf->sriov->stride; > 1624 } 1625 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3479/3479] drivers/ub/urma/ubagg/ubagg_ioctl.c:70:6: warning: no previous prototype for 'ubagg_dev_ref_get'
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4b48fa45408a2757255bdd0c640c1f693b424fe4 commit: 1fe6d02bf7ba2fb5c30d3c4bed50f127243f7128 [3479/3479] urma: add ubagg ioctl interface and topology management config: arm64-randconfig-r061-20251205 (https://download.01.org/0day-ci/archive/20251206/202512060320.lR9JnDhZ-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060320.lR9JnDhZ-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060320.lR9JnDhZ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/ubagg/ubagg_ioctl.c:70:6: warning: no previous prototype for 'ubagg_dev_ref_get' [-Wmissing-prototypes] 70 | void ubagg_dev_ref_get(struct ubagg_device *dev) | ^~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:75:6: warning: no previous prototype for 'ubagg_dev_ref_put' [-Wmissing-prototypes] 75 | void ubagg_dev_ref_put(struct ubagg_device *dev) | ^~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:446:5: warning: no previous prototype for 'ubagg_user_ctl' [-Wmissing-prototypes] 446 | int ubagg_user_ctl(struct ubcore_device *dev, struct ubcore_user_ctl *user_ctl) | ^~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:483:5: warning: no previous prototype for 'ubagg_config_device' [-Wmissing-prototypes] 483 | int ubagg_config_device(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:514:20: warning: no previous prototype for 'ubagg_create_jfc' [-Wmissing-prototypes] 514 | struct ubcore_jfc *ubagg_create_jfc(struct ubcore_device *ub_dev, | ^~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:550:5: warning: no previous prototype for 'ubagg_destroy_jfc' [-Wmissing-prototypes] 550 | int ubagg_destroy_jfc(struct ubcore_jfc *jfc) | ^~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:568:20: warning: no previous prototype for 'ubagg_create_jfs' [-Wmissing-prototypes] 568 | struct ubcore_jfs *ubagg_create_jfs(struct ubcore_device *ub_dev, | ^~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:609:5: warning: no previous prototype for 'ubagg_destroy_jfs' [-Wmissing-prototypes] 609 | int ubagg_destroy_jfs(struct ubcore_jfs *jfs) | ^~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:626:20: warning: no previous prototype for 'ubagg_create_jfr' [-Wmissing-prototypes] 626 | struct ubcore_jfr *ubagg_create_jfr(struct ubcore_device *ub_dev, | ^~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:718:5: warning: no previous prototype for 'ubagg_destroy_jfr' [-Wmissing-prototypes] 718 | int ubagg_destroy_jfr(struct ubcore_jfr *jfr) | ^~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:737:22: warning: no previous prototype for 'ubagg_create_jetty' [-Wmissing-prototypes] 737 | struct ubcore_jetty *ubagg_create_jetty(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:829:5: warning: no previous prototype for 'ubagg_destroy_jetty' [-Wmissing-prototypes] 829 | int ubagg_destroy_jetty(struct ubcore_jetty *jetty) | ^~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubagg/ubagg_ioctl.c:849:5: warning: no previous prototype for 'ubagg_query_device_status' [-Wmissing-prototypes] 849 | int ubagg_query_device_status(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] vim +/ubagg_dev_ref_get +70 drivers/ub/urma/ubagg/ubagg_ioctl.c 69 > 70 void ubagg_dev_ref_get(struct ubagg_device *dev) 71 { 72 kref_get(&dev->ref); 73 } 74 > 75 void ubagg_dev_ref_put(struct ubagg_device *dev) 76 { 77 kref_put(&dev->ref, ubagg_dev_release); 78 } 79 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 3382/3382] include/linux/uaccess.h:232:16: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 06a8b520851290347ca458d4335bebc607fe3b58 commit: 8a9bc410e7ccf0bcddb6a6f6ccc526bae11d0311 [3382/3382] arm64: add support for machine check error safe config: arm64-randconfig-r122-20251205 (https://download.01.org/0day-ci/archive/20251206/202512060317.8FXM9zSz-lkp@…) compiler: aarch64-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060317.8FXM9zSz-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060317.8FXM9zSz-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) lib/iov_iter.c: note: in included file (through include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/rcuwait.h, ...): >> include/linux/uaccess.h:232:16: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got void *dst @@ include/linux/uaccess.h:232:16: sparse: expected void const [noderef] __user *ptr include/linux/uaccess.h:232:16: sparse: got void *dst lib/iov_iter.c: note: in included file: include/net/checksum.h:31:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:31:39: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:31:39: sparse: got unsigned int include/net/checksum.h:31:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:31:39: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:31:39: sparse: got unsigned int include/net/checksum.h:31:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:31:39: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:31:39: sparse: got unsigned int include/net/checksum.h:31:39: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:31:39: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:31:39: sparse: got unsigned int include/net/checksum.h:39:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:39:45: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:39:45: sparse: got unsigned int include/net/checksum.h:39:45: sparse: sparse: incorrect type in argument 3 (different base types) @@ expected restricted __wsum [usertype] sum @@ got unsigned int @@ include/net/checksum.h:39:45: sparse: expected restricted __wsum [usertype] sum include/net/checksum.h:39:45: sparse: got unsigned int vim +232 include/linux/uaccess.h ec6347bb43395c Dan Williams 2020-10-05 226 406637c11f9a83 Tong Tiangen 2022-11-18 227 #ifndef copy_mc_to_user 406637c11f9a83 Tong Tiangen 2022-11-18 228 static inline unsigned long __must_check 406637c11f9a83 Tong Tiangen 2022-11-18 229 copy_mc_to_user(void *dst, const void *src, size_t cnt) 406637c11f9a83 Tong Tiangen 2022-11-18 230 { 406637c11f9a83 Tong Tiangen 2022-11-18 231 check_object_size(src, cnt, true); 406637c11f9a83 Tong Tiangen 2022-11-18 @232 return raw_copy_to_user(dst, src, cnt); 406637c11f9a83 Tong Tiangen 2022-11-18 233 } 406637c11f9a83 Tong Tiangen 2022-11-18 234 #endif 406637c11f9a83 Tong Tiangen 2022-11-18 235 :::::: The code at line 232 was first introduced by commit :::::: 406637c11f9a834ac362d9fcf9073fb381167428 uaccess: add generic fallback version of copy_mc_to_user() :::::: TO: Tong Tiangen <tongtiangen(a)huawei.com> :::::: CC: Ma Wupeng <mawupeng1(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3479/3479] drivers/ub/urma/uburma/uburma_dev_ops.c:68:6: warning: no previous prototype for 'uburma_unregister_mmu'
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4b48fa45408a2757255bdd0c640c1f693b424fe4 commit: 901128a1ed92d11749cd5ad529be4e30f3196214 [3479/3479] uburma: add uburma command and user object framework headers config: arm64-randconfig-r061-20251205 (https://download.01.org/0day-ci/archive/20251206/202512060214.uqTv7hOT-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060214.uqTv7hOT-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060214.uqTv7hOT-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/uburma/uburma_dev_ops.c:68:6: warning: no previous prototype for 'uburma_unregister_mmu' [-Wmissing-prototypes] 68 | void uburma_unregister_mmu(struct uburma_file *file) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/uburma/uburma_dev_ops.c:80:5: warning: no previous prototype for 'uburma_register_mmu' [-Wmissing-prototypes] 80 | int uburma_register_mmu(struct uburma_file *file) | ^~~~~~~~~~~~~~~~~~~ drivers/ub/urma/uburma/uburma_dev_ops.c:96:6: warning: no previous prototype for 'uburma_release_file' [-Wmissing-prototypes] 96 | void uburma_release_file(struct kref *ref) | ^~~~~~~~~~~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] vim +/uburma_unregister_mmu +68 drivers/ub/urma/uburma/uburma_dev_ops.c 67 > 68 void uburma_unregister_mmu(struct uburma_file *file) 69 { 70 struct uburma_mn *ub_mn = &file->ub_mn; 71 struct mm_struct *mm = ub_mn->mm; 72 73 if (!mm) 74 return; 75 76 file->ub_mn.mm = NULL; 77 mmu_notifier_unregister(&file->ub_mn.mn, mm); 78 } 79 > 80 int uburma_register_mmu(struct uburma_file *file) 81 { 82 struct uburma_mn *ub_mn = &file->ub_mn; 83 int ret = 0; 84 85 ub_mn->mm = current->mm; 86 ub_mn->mn.ops = &uburma_mm_notifier_ops; 87 ret = mmu_notifier_register(&ub_mn->mn, current->mm); 88 if (ret) { 89 ub_mn->mm = NULL; 90 return ret; 91 } 92 93 return 0; 94 } 95 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3479/3479] drivers/ub/urma/ubcore/ubcore_tp.c:16:5: warning: no previous prototype for 'ubcore_get_tp_list'
by kernel test robot 06 Dec '25

06 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4b48fa45408a2757255bdd0c640c1f693b424fe4 commit: ea9d81b3942d8f0336b9207b594a748e20ec16dd [3479/3479] ubcore: add ubcore_umem and ubcore_tp implementations config: arm64-randconfig-r061-20251205 (https://download.01.org/0day-ci/archive/20251206/202512060140.vNbFPUxu-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512060140.vNbFPUxu-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512060140.vNbFPUxu-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/ubcore/ubcore_tp.c:16:5: warning: no previous prototype for 'ubcore_get_tp_list' [-Wmissing-prototypes] 16 | int ubcore_get_tp_list(struct ubcore_device *dev, struct ubcore_get_tp_cfg *cfg, | ^~~~~~~~~~~~~~~~~~ -- >> drivers/ub/urma/ubcore/ubcore_tp_table.c:18:5: warning: no previous prototype for 'ubcore_destroy_tp' [-Wmissing-prototypes] 18 | int ubcore_destroy_tp(struct ubcore_tp *tp) | ^~~~~~~~~~~~~~~~~ -- >> drivers/ub/urma/ubcore/ubcm/ub_cm.c:56:37: warning: 'g_ubcm_ops' defined but not used [-Wunused-const-variable=] 56 | static const struct file_operations g_ubcm_ops = { | ^~~~~~~~~~ Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] vim +/ubcore_get_tp_list +16 drivers/ub/urma/ubcore/ubcore_tp.c 15 > 16 int ubcore_get_tp_list(struct ubcore_device *dev, struct ubcore_get_tp_cfg *cfg, -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-5.10 3382/3382] mm/mem_reliable.c:430:2: error: implicit declaration of function 'mem_reliable_ctrl_bit_disable'; did you mean 'mem_reliable_ctrl_bit_disabled'?
by kernel test robot 05 Dec '25

05 Dec '25
Hi Ma, FYI, the error/warning still remains. tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: 06a8b520851290347ca458d4335bebc607fe3b58 commit: 2525d04c6308006b789564ed955081602727f38f [3382/3382] mm: Introduce proc interface to disable memory reliable features config: arm64-randconfig-r122-20251205 (https://download.01.org/0day-ci/archive/20251205/202512052303.PrP6S3Hw-lkp@…) compiler: aarch64-linux-gcc (GCC) 8.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251205/202512052303.PrP6S3Hw-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512052303.PrP6S3Hw-lkp@intel.com/ All error/warnings (new ones prefixed by >>): mm/mem_reliable.c: In function 'mem_reliable_feature_disable': >> mm/mem_reliable.c:430:2: error: implicit declaration of function 'mem_reliable_ctrl_bit_disable'; did you mean 'mem_reliable_ctrl_bit_disabled'? [-Werror=implicit-function-declaration] mem_reliable_ctrl_bit_disable(idx); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mem_reliable_ctrl_bit_disabled At top level: >> mm/mem_reliable.c:405:13: warning: 'mem_reliable_ctrl_bit_disabled' defined but not used [-Wunused-function] static void mem_reliable_ctrl_bit_disabled(int idx) {} ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PCI_IOV Depends on [n]: PCI [=n] Selected by [y]: - CRYPTO_DEV_HISI_MIGRATION [=y] && CRYPTO [=y] && CRYPTO_HW [=y] && ARM64 [=y] && ACPI [=y] vim +430 mm/mem_reliable.c 387 388 static int __init reliable_sysctl_init(void) 389 { 390 if (!mem_reliable_is_enabled()) 391 return 0; 392 393 if (!register_sysctl_table(reliable_dir_table)) { 394 pr_err("register sysctl failed."); 395 return -ENOMEM; 396 } 397 398 percpu_counter_init(&pagecache_reliable_pages, 0, GFP_KERNEL); 399 percpu_counter_init(&anon_reliable_pages, 0, GFP_KERNEL); 400 401 return 0; 402 } 403 arch_initcall(reliable_sysctl_init); 404 #else > 405 static void mem_reliable_ctrl_bit_disabled(int idx) {} 406 #endif 407 408 static void mem_reliable_feature_disable(int idx) 409 { 410 char *str = NULL; 411 412 switch (idx) { 413 case MEM_RELIABLE_FALLBACK: 414 reliable_allow_fallback = false; 415 str = "fallback"; 416 break; 417 case MEM_RELIABLE_SHMEM: 418 shmem_reliable = false; 419 str = "shmem"; 420 break; 421 case MEM_RELIABLE_PAGECACHE: 422 pagecache_use_reliable_mem = false; 423 str = "pagecache"; 424 break; 425 default: 426 pr_err("unknown index: %d", idx); 427 return; 428 } 429 > 430 mem_reliable_ctrl_bit_disable(idx); 431 pr_info("%s is disabled\n", str); 432 } 433 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
[openeuler:OLK-6.6 3479/3479] drivers/ub/urma/ubcore/ubcore_segment.c:20:25: warning: no previous prototype for 'ubcore_alloc_token_id'
by kernel test robot 05 Dec '25

05 Dec '25
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4b48fa45408a2757255bdd0c640c1f693b424fe4 commit: e34a52d4eed8912f6dfdc7d68152c45f7a071ca8 [3479/3479] ubcore: implement ubcore connection management and messaging feature. config: arm64-randconfig-r061-20251205 (https://download.01.org/0day-ci/archive/20251205/202512052329.KGMXGdpW-lkp@…) compiler: aarch64-linux-gcc (GCC) 9.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251205/202512052329.KGMXGdpW-lkp@…) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp(a)intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202512052329.KGMXGdpW-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/ub/urma/ubcore/ubcore_segment.c:20:25: warning: no previous prototype for 'ubcore_alloc_token_id' [-Wmissing-prototypes] 20 | struct ubcore_token_id *ubcore_alloc_token_id(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_segment.c:51:5: warning: no previous prototype for 'ubcore_free_token_id' [-Wmissing-prototypes] 51 | int ubcore_free_token_id(struct ubcore_token_id *token_id) | ^~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_segment.c:115:27: warning: no previous prototype for 'ubcore_register_seg' [-Wmissing-prototypes] 115 | struct ubcore_target_seg *ubcore_register_seg(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_segment.c:170:5: warning: no previous prototype for 'ubcore_unregister_seg' [-Wmissing-prototypes] 170 | int ubcore_unregister_seg(struct ubcore_target_seg *tseg) | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_segment.c:204:27: warning: no previous prototype for 'ubcore_import_seg' [-Wmissing-prototypes] 204 | struct ubcore_target_seg *ubcore_import_seg(struct ubcore_device *dev, | ^~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcore_segment.c:239:5: warning: no previous prototype for 'ubcore_unimport_seg' [-Wmissing-prototypes] 239 | int ubcore_unimport_seg(struct ubcore_target_seg *tseg) | ^~~~~~~~~~~~~~~~~~~ -- In file included from drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:16: drivers/ub/urma/ubcore/ubcore_topo_info.h:56:34: warning: 'union ubcore_eid' declared inside parameter list will not be visible outside of this definition or declaration 56 | int ubcore_get_primary_eid(union ubcore_eid *eid, | ^~~~~~~~~~ drivers/ub/urma/ubcore/ubcore_topo_info.h:59:49: warning: 'union ubcore_eid' declared inside parameter list will not be visible outside of this definition or declaration 59 | int ubcore_get_primary_eid_by_bonding_eid(union ubcore_eid *bonding_eid, | ^~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:143:23: warning: no previous prototype for 'ubmad_create_rt_work' [-Wmissing-prototypes] 143 | struct ubmad_rt_work *ubmad_create_rt_work(struct workqueue_struct *rt_wq, | ^~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c: In function 'ubmad_do_post_send_conn_data': drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:365:8: error: implicit declaration of function 'ubcore_post_jetty_send_wr' [-Werror=implicit-function-declaration] 365 | ret = ubcore_post_jetty_send_wr(jetty, jfs_wr, &jfs_bad_wr); | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c: In function 'ubmad_post_send': drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:506:31: error: passing argument 1 of 'ubcore_get_primary_eid' from incompatible pointer type [-Werror=incompatible-pointer-types] 506 | ret = ubcore_get_primary_eid(&send_buf->dst_eid, &dst_primary_eid); | ^~~~~~~~~~~~~~~~~~ | | | union ubcore_eid * In file included from drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:16: drivers/ub/urma/ubcore/ubcore_topo_info.h:56:46: note: expected 'union ubcore_eid *' but argument is of type 'union ubcore_eid *' 56 | int ubcore_get_primary_eid(union ubcore_eid *eid, | ~~~~~~~~~~~~~~~~~~^~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:506:51: error: passing argument 2 of 'ubcore_get_primary_eid' from incompatible pointer type [-Werror=incompatible-pointer-types] 506 | ret = ubcore_get_primary_eid(&send_buf->dst_eid, &dst_primary_eid); | ^~~~~~~~~~~~~~~~ | | | union ubcore_eid * In file included from drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:16: drivers/ub/urma/ubcore/ubcore_topo_info.h:57:25: note: expected 'union ubcore_eid *' but argument is of type 'union ubcore_eid *' 57 | union ubcore_eid *primary_eid); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:470:23: warning: variable 'wk_jetty' set but not used [-Wunused-but-set-variable] 470 | struct ubcore_jetty *wk_jetty; // well-known jetty | ^~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c: At top level: >> drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:532:5: warning: no previous prototype for 'ubmad_post_send_conn_ack' [-Wmissing-prototypes] 532 | int ubmad_post_send_conn_ack(struct ubmad_jetty_resource *rsrc, | ^~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:552:5: warning: no previous prototype for 'ubmad_repost_send_conn_data' [-Wmissing-prototypes] 552 | int ubmad_repost_send_conn_data(struct ubcore_jetty *jetty, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c: In function 'ubmad_post_recv': drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:724:8: error: implicit declaration of function 'ubcore_post_jetty_recv_wr' [-Werror=implicit-function-declaration] 724 | ret = ubcore_post_jetty_recv_wr(rsrc->jetty, &jfr_wr, &jfr_bad_wr); | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c: At top level: >> drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:759:6: warning: no previous prototype for 'ubmad_process_rx_msn' [-Wmissing-prototypes] 759 | bool ubmad_process_rx_msn(struct ubmad_bitmap *rx_bitmap, uint64_t msn) | ^~~~~~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c: In function 'ubmad_send_work_handler': drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:1007:12: error: implicit declaration of function 'ubcore_poll_jfc' [-Werror=implicit-function-declaration] 1007 | cr_cnt = ubcore_poll_jfc(jfc, 1, &cr); | ^~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:1047:8: error: implicit declaration of function 'ubcore_rearm_jfc' [-Werror=implicit-function-declaration] 1047 | ret = ubcore_rearm_jfc(jfc, false); | ^~~~~~~~~~~~~~~~ drivers/ub/urma/ubcore/ubcm/ubmad_datapath.c:989:20: warning: variable 'msg' set but not used [-Wunused-but-set-variable] 989 | struct ubmad_msg *msg; | ^~~ cc1: some warnings being treated as errors Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PGP_PRELOAD Depends on [n]: CRYPTO [=y] && ASYMMETRIC_KEY_TYPE [=n] Selected by [y]: - PGP_PRELOAD_PUBLIC_KEYS [=y] && CRYPTO [=y] vim +/ubcore_alloc_token_id +20 drivers/ub/urma/ubcore/ubcore_segment.c 39ee38e13c0fb8 Wen Chen 2025-11-12 19 39ee38e13c0fb8 Wen Chen 2025-11-12 @20 struct ubcore_token_id *ubcore_alloc_token_id(struct ubcore_device *dev, 39ee38e13c0fb8 Wen Chen 2025-11-12 21 union ubcore_token_id_flag flag, 39ee38e13c0fb8 Wen Chen 2025-11-12 22 struct ubcore_udata *udata) 39ee38e13c0fb8 Wen Chen 2025-11-12 23 { 39ee38e13c0fb8 Wen Chen 2025-11-12 24 struct ubcore_token_id *token_id; 39ee38e13c0fb8 Wen Chen 2025-11-12 25 39ee38e13c0fb8 Wen Chen 2025-11-12 26 if (flag.bs.pa == 1 && udata != NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 27 ubcore_log_err("invalid parameter of pa.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 28 return ERR_PTR(-EINVAL); 39ee38e13c0fb8 Wen Chen 2025-11-12 29 } 39ee38e13c0fb8 Wen Chen 2025-11-12 30 39ee38e13c0fb8 Wen Chen 2025-11-12 31 if (dev == NULL || dev->ops == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 32 dev->ops->alloc_token_id == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 33 dev->ops->free_token_id == NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 34 ubcore_log_err("invalid parameter.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 35 return ERR_PTR(-EINVAL); 39ee38e13c0fb8 Wen Chen 2025-11-12 36 } 39ee38e13c0fb8 Wen Chen 2025-11-12 37 39ee38e13c0fb8 Wen Chen 2025-11-12 38 token_id = dev->ops->alloc_token_id(dev, flag, udata); 39ee38e13c0fb8 Wen Chen 2025-11-12 39 if (IS_ERR_OR_NULL(token_id)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 40 ubcore_log_err("failed to alloc token_id id.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 41 return UBCORE_CHECK_RETURN_ERR_PTR(token_id, ENOEXEC); 39ee38e13c0fb8 Wen Chen 2025-11-12 42 } 39ee38e13c0fb8 Wen Chen 2025-11-12 43 token_id->flag = flag; 39ee38e13c0fb8 Wen Chen 2025-11-12 44 token_id->ub_dev = dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 45 token_id->uctx = ubcore_get_uctx(udata); 39ee38e13c0fb8 Wen Chen 2025-11-12 46 atomic_set(&token_id->use_cnt, 0); 39ee38e13c0fb8 Wen Chen 2025-11-12 47 return token_id; 39ee38e13c0fb8 Wen Chen 2025-11-12 48 } 39ee38e13c0fb8 Wen Chen 2025-11-12 49 EXPORT_SYMBOL(ubcore_alloc_token_id); 39ee38e13c0fb8 Wen Chen 2025-11-12 50 39ee38e13c0fb8 Wen Chen 2025-11-12 @51 int ubcore_free_token_id(struct ubcore_token_id *token_id) 39ee38e13c0fb8 Wen Chen 2025-11-12 52 { 39ee38e13c0fb8 Wen Chen 2025-11-12 53 struct ubcore_device *dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 54 39ee38e13c0fb8 Wen Chen 2025-11-12 55 if (token_id == NULL || token_id->ub_dev == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 56 token_id->ub_dev->ops == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 57 token_id->ub_dev->ops->free_token_id == NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 58 ubcore_log_err("invalid parameter.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 59 return -EINVAL; 39ee38e13c0fb8 Wen Chen 2025-11-12 60 } 39ee38e13c0fb8 Wen Chen 2025-11-12 61 dev = token_id->ub_dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 62 39ee38e13c0fb8 Wen Chen 2025-11-12 63 if (atomic_read(&token_id->use_cnt)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 64 ubcore_log_err("The token_id is still being used"); 39ee38e13c0fb8 Wen Chen 2025-11-12 65 return -EBUSY; 39ee38e13c0fb8 Wen Chen 2025-11-12 66 } 39ee38e13c0fb8 Wen Chen 2025-11-12 67 return dev->ops->free_token_id(token_id); 39ee38e13c0fb8 Wen Chen 2025-11-12 68 } 39ee38e13c0fb8 Wen Chen 2025-11-12 69 EXPORT_SYMBOL(ubcore_free_token_id); 39ee38e13c0fb8 Wen Chen 2025-11-12 70 39ee38e13c0fb8 Wen Chen 2025-11-12 71 static int ubcore_check_register_seg_para(struct ubcore_device *dev, 39ee38e13c0fb8 Wen Chen 2025-11-12 72 struct ubcore_seg_cfg *cfg, 39ee38e13c0fb8 Wen Chen 2025-11-12 73 struct ubcore_udata *udata) 39ee38e13c0fb8 Wen Chen 2025-11-12 74 { 39ee38e13c0fb8 Wen Chen 2025-11-12 75 if (dev == NULL || cfg == NULL || dev->ops == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 76 dev->ops->register_seg == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 77 dev->ops->unregister_seg == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 78 IS_ERR_OR_NULL(dev->eid_table.eid_entries)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 79 ubcore_log_err("invalid parameter.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 80 return -1; 39ee38e13c0fb8 Wen Chen 2025-11-12 81 } 39ee38e13c0fb8 Wen Chen 2025-11-12 82 39ee38e13c0fb8 Wen Chen 2025-11-12 83 if (ubcore_is_bonding_dev(dev)) 39ee38e13c0fb8 Wen Chen 2025-11-12 84 return 0; 39ee38e13c0fb8 Wen Chen 2025-11-12 85 39ee38e13c0fb8 Wen Chen 2025-11-12 86 if (cfg->flag.bs.pa == 1 && udata != NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 87 ubcore_log_err("invalid parameter of pa.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 88 return -1; 39ee38e13c0fb8 Wen Chen 2025-11-12 89 } 39ee38e13c0fb8 Wen Chen 2025-11-12 90 39ee38e13c0fb8 Wen Chen 2025-11-12 91 if (dev->transport_type == UBCORE_TRANSPORT_UB && 39ee38e13c0fb8 Wen Chen 2025-11-12 92 ((cfg->flag.bs.token_id_valid == UBCORE_TOKEN_ID_VALID && 39ee38e13c0fb8 Wen Chen 2025-11-12 93 cfg->token_id == NULL) || 39ee38e13c0fb8 Wen Chen 2025-11-12 94 (cfg->flag.bs.token_id_valid == UBCORE_TOKEN_ID_INVALID && 39ee38e13c0fb8 Wen Chen 2025-11-12 95 cfg->token_id != NULL))) { 39ee38e13c0fb8 Wen Chen 2025-11-12 96 ubcore_log_err("invalid parameter of token_id.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 97 return -1; 39ee38e13c0fb8 Wen Chen 2025-11-12 98 } 39ee38e13c0fb8 Wen Chen 2025-11-12 99 39ee38e13c0fb8 Wen Chen 2025-11-12 100 if (dev->transport_type == UBCORE_TRANSPORT_UB && 39ee38e13c0fb8 Wen Chen 2025-11-12 101 cfg->flag.bs.token_id_valid == UBCORE_TOKEN_ID_VALID && 39ee38e13c0fb8 Wen Chen 2025-11-12 102 cfg->token_id->flag.bs.pa != cfg->flag.bs.pa) { 39ee38e13c0fb8 Wen Chen 2025-11-12 103 ubcore_log_err("invalid parameter of token_id pa.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 104 return -1; 39ee38e13c0fb8 Wen Chen 2025-11-12 105 } 39ee38e13c0fb8 Wen Chen 2025-11-12 106 39ee38e13c0fb8 Wen Chen 2025-11-12 107 if (cfg->eid_index >= dev->eid_table.eid_cnt) { 39ee38e13c0fb8 Wen Chen 2025-11-12 108 ubcore_log_warn("eid_index:%u >= eid_table cnt:%u.\n", 39ee38e13c0fb8 Wen Chen 2025-11-12 109 cfg->eid_index, dev->eid_table.eid_cnt); 39ee38e13c0fb8 Wen Chen 2025-11-12 110 return -1; 39ee38e13c0fb8 Wen Chen 2025-11-12 111 } 39ee38e13c0fb8 Wen Chen 2025-11-12 112 return 0; 39ee38e13c0fb8 Wen Chen 2025-11-12 113 } 39ee38e13c0fb8 Wen Chen 2025-11-12 114 39ee38e13c0fb8 Wen Chen 2025-11-12 @115 struct ubcore_target_seg *ubcore_register_seg(struct ubcore_device *dev, 39ee38e13c0fb8 Wen Chen 2025-11-12 116 struct ubcore_seg_cfg *cfg, 39ee38e13c0fb8 Wen Chen 2025-11-12 117 struct ubcore_udata *udata) 39ee38e13c0fb8 Wen Chen 2025-11-12 118 { 39ee38e13c0fb8 Wen Chen 2025-11-12 119 union ubcore_token_id_flag flag = { 0 }; 39ee38e13c0fb8 Wen Chen 2025-11-12 120 bool alloc_token_id = false; 39ee38e13c0fb8 Wen Chen 2025-11-12 121 struct ubcore_seg_cfg tmp_cfg; 39ee38e13c0fb8 Wen Chen 2025-11-12 122 struct ubcore_target_seg *tseg; 39ee38e13c0fb8 Wen Chen 2025-11-12 123 39ee38e13c0fb8 Wen Chen 2025-11-12 124 if (ubcore_check_register_seg_para(dev, cfg, udata) != 0) 39ee38e13c0fb8 Wen Chen 2025-11-12 125 return ERR_PTR(-EINVAL); 39ee38e13c0fb8 Wen Chen 2025-11-12 126 39ee38e13c0fb8 Wen Chen 2025-11-12 127 if (udata == NULL && 39ee38e13c0fb8 Wen Chen 2025-11-12 128 cfg->flag.bs.token_id_valid == UBCORE_TOKEN_ID_INVALID && 39ee38e13c0fb8 Wen Chen 2025-11-12 129 dev->transport_type == UBCORE_TRANSPORT_UB) 39ee38e13c0fb8 Wen Chen 2025-11-12 130 alloc_token_id = true; 39ee38e13c0fb8 Wen Chen 2025-11-12 131 39ee38e13c0fb8 Wen Chen 2025-11-12 132 tmp_cfg = *cfg; 39ee38e13c0fb8 Wen Chen 2025-11-12 133 if (alloc_token_id == true) { 39ee38e13c0fb8 Wen Chen 2025-11-12 134 flag.bs.pa = cfg->flag.bs.pa; 39ee38e13c0fb8 Wen Chen 2025-11-12 135 tmp_cfg.token_id = ubcore_alloc_token_id(dev, flag, NULL); 39ee38e13c0fb8 Wen Chen 2025-11-12 136 if (IS_ERR_OR_NULL(tmp_cfg.token_id)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 137 ubcore_log_err("alloc token id failed.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 138 return (void *)tmp_cfg.token_id; 39ee38e13c0fb8 Wen Chen 2025-11-12 139 } 39ee38e13c0fb8 Wen Chen 2025-11-12 140 } 39ee38e13c0fb8 Wen Chen 2025-11-12 141 39ee38e13c0fb8 Wen Chen 2025-11-12 142 tseg = dev->ops->register_seg(dev, &tmp_cfg, udata); 39ee38e13c0fb8 Wen Chen 2025-11-12 143 if (IS_ERR_OR_NULL(tseg)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 144 ubcore_log_err_rl("UBEP failed to register segment.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 145 if (alloc_token_id == true) 39ee38e13c0fb8 Wen Chen 2025-11-12 146 (void)ubcore_free_token_id(tmp_cfg.token_id); 39ee38e13c0fb8 Wen Chen 2025-11-12 147 return UBCORE_CHECK_RETURN_ERR_PTR(tseg, ENOEXEC); 39ee38e13c0fb8 Wen Chen 2025-11-12 148 } 39ee38e13c0fb8 Wen Chen 2025-11-12 149 39ee38e13c0fb8 Wen Chen 2025-11-12 150 tseg->ub_dev = dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 151 tseg->uctx = ubcore_get_uctx(udata); 39ee38e13c0fb8 Wen Chen 2025-11-12 152 tseg->seg.len = tmp_cfg.len; 39ee38e13c0fb8 Wen Chen 2025-11-12 153 tseg->seg.ubva.va = tmp_cfg.va; 39ee38e13c0fb8 Wen Chen 2025-11-12 154 tseg->token_id = tmp_cfg.token_id; 39ee38e13c0fb8 Wen Chen 2025-11-12 155 39ee38e13c0fb8 Wen Chen 2025-11-12 156 (void)memcpy(tseg->seg.ubva.eid.raw, 39ee38e13c0fb8 Wen Chen 2025-11-12 157 dev->eid_table.eid_entries[cfg->eid_index].eid.raw, 39ee38e13c0fb8 Wen Chen 2025-11-12 158 UBCORE_EID_SIZE); 39ee38e13c0fb8 Wen Chen 2025-11-12 159 (void)memcpy(&tseg->seg.attr, &cfg->flag, 39ee38e13c0fb8 Wen Chen 2025-11-12 160 sizeof(union ubcore_reg_seg_flag)); 39ee38e13c0fb8 Wen Chen 2025-11-12 161 tseg->seg.attr.bs.user_token_id = tmp_cfg.flag.bs.token_id_valid; 39ee38e13c0fb8 Wen Chen 2025-11-12 162 atomic_set(&tseg->use_cnt, 0); 39ee38e13c0fb8 Wen Chen 2025-11-12 163 if (tseg->token_id != NULL) 39ee38e13c0fb8 Wen Chen 2025-11-12 164 atomic_inc(&tseg->token_id->use_cnt); 39ee38e13c0fb8 Wen Chen 2025-11-12 165 39ee38e13c0fb8 Wen Chen 2025-11-12 166 return tseg; 39ee38e13c0fb8 Wen Chen 2025-11-12 167 } 39ee38e13c0fb8 Wen Chen 2025-11-12 168 EXPORT_SYMBOL(ubcore_register_seg); 39ee38e13c0fb8 Wen Chen 2025-11-12 169 39ee38e13c0fb8 Wen Chen 2025-11-12 @170 int ubcore_unregister_seg(struct ubcore_target_seg *tseg) 39ee38e13c0fb8 Wen Chen 2025-11-12 171 { 39ee38e13c0fb8 Wen Chen 2025-11-12 172 struct ubcore_token_id *token_id = NULL; 39ee38e13c0fb8 Wen Chen 2025-11-12 173 bool free_token_id = false; 39ee38e13c0fb8 Wen Chen 2025-11-12 174 struct ubcore_device *dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 175 int ret; 39ee38e13c0fb8 Wen Chen 2025-11-12 176 39ee38e13c0fb8 Wen Chen 2025-11-12 177 if (tseg == NULL || tseg->ub_dev == NULL || tseg->ub_dev->ops == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 178 tseg->ub_dev->ops->unregister_seg == NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 179 ubcore_log_err("invalid parameter.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 180 return -EINVAL; 39ee38e13c0fb8 Wen Chen 2025-11-12 181 } 39ee38e13c0fb8 Wen Chen 2025-11-12 182 39ee38e13c0fb8 Wen Chen 2025-11-12 183 dev = tseg->ub_dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 184 39ee38e13c0fb8 Wen Chen 2025-11-12 185 if (tseg->token_id != NULL) 39ee38e13c0fb8 Wen Chen 2025-11-12 186 atomic_dec(&tseg->token_id->use_cnt); 39ee38e13c0fb8 Wen Chen 2025-11-12 187 39ee38e13c0fb8 Wen Chen 2025-11-12 188 if (tseg->seg.attr.bs.user_token_id == UBCORE_TOKEN_ID_INVALID && 39ee38e13c0fb8 Wen Chen 2025-11-12 189 dev->transport_type == UBCORE_TRANSPORT_UB && 39ee38e13c0fb8 Wen Chen 2025-11-12 190 tseg->token_id != NULL && tseg->uctx == NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 191 free_token_id = true; 39ee38e13c0fb8 Wen Chen 2025-11-12 192 token_id = tseg->token_id; 39ee38e13c0fb8 Wen Chen 2025-11-12 193 } 39ee38e13c0fb8 Wen Chen 2025-11-12 194 39ee38e13c0fb8 Wen Chen 2025-11-12 195 ret = dev->ops->unregister_seg(tseg); 39ee38e13c0fb8 Wen Chen 2025-11-12 196 39ee38e13c0fb8 Wen Chen 2025-11-12 197 if (free_token_id == true && token_id != NULL) 39ee38e13c0fb8 Wen Chen 2025-11-12 198 (void)ubcore_free_token_id(token_id); 39ee38e13c0fb8 Wen Chen 2025-11-12 199 39ee38e13c0fb8 Wen Chen 2025-11-12 200 return ret; 39ee38e13c0fb8 Wen Chen 2025-11-12 201 } 39ee38e13c0fb8 Wen Chen 2025-11-12 202 EXPORT_SYMBOL(ubcore_unregister_seg); 39ee38e13c0fb8 Wen Chen 2025-11-12 203 39ee38e13c0fb8 Wen Chen 2025-11-12 @204 struct ubcore_target_seg *ubcore_import_seg(struct ubcore_device *dev, 39ee38e13c0fb8 Wen Chen 2025-11-12 205 struct ubcore_target_seg_cfg *cfg, 39ee38e13c0fb8 Wen Chen 2025-11-12 206 struct ubcore_udata *udata) 39ee38e13c0fb8 Wen Chen 2025-11-12 207 { 39ee38e13c0fb8 Wen Chen 2025-11-12 208 struct ubcore_target_seg *tseg; 39ee38e13c0fb8 Wen Chen 2025-11-12 209 39ee38e13c0fb8 Wen Chen 2025-11-12 210 if (dev == NULL || cfg == NULL || dev->ops == NULL || 39ee38e13c0fb8 Wen Chen 2025-11-12 211 dev->ops->import_seg == NULL || dev->ops->unimport_seg == NULL) { 39ee38e13c0fb8 Wen Chen 2025-11-12 212 ubcore_log_err("invalid parameter.\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 213 return ERR_PTR(-EINVAL); 39ee38e13c0fb8 Wen Chen 2025-11-12 214 } 39ee38e13c0fb8 Wen Chen 2025-11-12 215 39ee38e13c0fb8 Wen Chen 2025-11-12 216 if (ubcore_is_bonding_dev(dev)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 217 if (ubcore_connect_exchange_udata_when_import_seg(&cfg->seg, 39ee38e13c0fb8 Wen Chen 2025-11-12 218 udata) != 0) { 39ee38e13c0fb8 Wen Chen 2025-11-12 219 ubcore_log_err( 39ee38e13c0fb8 Wen Chen 2025-11-12 220 "failed to exchange udata when import seg\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 221 return ERR_PTR(-ENOEXEC); 39ee38e13c0fb8 Wen Chen 2025-11-12 222 } 39ee38e13c0fb8 Wen Chen 2025-11-12 223 } 39ee38e13c0fb8 Wen Chen 2025-11-12 224 39ee38e13c0fb8 Wen Chen 2025-11-12 225 tseg = dev->ops->import_seg(dev, cfg, udata); 39ee38e13c0fb8 Wen Chen 2025-11-12 226 if (IS_ERR_OR_NULL(tseg)) { 39ee38e13c0fb8 Wen Chen 2025-11-12 227 ubcore_log_err("UBEP failed to import segment with va\n"); 39ee38e13c0fb8 Wen Chen 2025-11-12 228 return UBCORE_CHECK_RETURN_ERR_PTR(tseg, ENOEXEC); 39ee38e13c0fb8 Wen Chen 2025-11-12 229 } 39ee38e13c0fb8 Wen Chen 2025-11-12 230 tseg->ub_dev = dev; 39ee38e13c0fb8 Wen Chen 2025-11-12 231 tseg->uctx = ubcore_get_uctx(udata); 39ee38e13c0fb8 Wen Chen 2025-11-12 232 tseg->seg = cfg->seg; 39ee38e13c0fb8 Wen Chen 2025-11-12 233 atomic_set(&tseg->use_cnt, 0); 39ee38e13c0fb8 Wen Chen 2025-11-12 234 39ee38e13c0fb8 Wen Chen 2025-11-12 235 return tseg; 39ee38e13c0fb8 Wen Chen 2025-11-12 236 } 39ee38e13c0fb8 Wen Chen 2025-11-12 237 EXPORT_SYMBOL(ubcore_import_seg); 39ee38e13c0fb8 Wen Chen 2025-11-12 238 :::::: The code at line 20 was first introduced by commit :::::: 39ee38e13c0fb848b3c1218b130ec629e82b1f72 ubcore: add segment management support to ubcore module. :::::: TO: Wen Chen <chenwen54(a)huawei.com> :::::: CC: Yongqiang Guo <guoyongqiang12(a)huawei.com> -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 2164
  • Older →

HyperKitty Powered by HyperKitty