tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: a29fc03bd0ddaf7388cf31604ef5bd9807585109 commit: 1a64cb7c7288cac262e7b3fd8d4dcd49b8a5bde5 [3075/3075] ub:ubus: Support for UB Bus Controller Enumeration config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251104/202511040855.Fu1HC1a9-lkp@i...) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511040855.Fu1HC1a9-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202511040855.Fu1HC1a9-lkp@intel.com/ All warnings (new ones prefixed by >>): drivers/ub/ubus/enum.c:996:5: warning: no previous prototype for function 'ub_cfg_read_guid' [-Wmissing-prototypes] 996 | int ub_cfg_read_guid(struct ub_entity *uent) | ^ drivers/ub/ubus/enum.c:996:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 996 | int ub_cfg_read_guid(struct ub_entity *uent) | ^ | static
drivers/ub/ubus/enum.c:1097:6: warning: no previous prototype for function 'ub_enum_clear_ent_list' [-Wmissing-prototypes] 1097 | void ub_enum_clear_ent_list(struct list_head *dev_list) | ^ drivers/ub/ubus/enum.c:1097:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1097 | void ub_enum_clear_ent_list(struct list_head *dev_list) | ^ | static drivers/ub/ubus/enum.c:1187:5: warning: no previous prototype for function 'ub_enum_probe' [-Wmissing-prototypes] 1187 | int ub_enum_probe(void) | ^ drivers/ub/ubus/enum.c:1187:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1187 | int ub_enum_probe(void) | ^ | static drivers/ub/ubus/enum.c:1211:6: warning: no previous prototype for function 'ub_enum_remove' [-Wmissing-prototypes] 1211 | void ub_enum_remove(void) | ^ drivers/ub/ubus/enum.c:1211:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 1211 | void ub_enum_remove(void) | ^ | static 4 warnings generated.
vim +/ub_enum_clear_ent_list +1097 drivers/ub/ubus/enum.c 995
996 int ub_cfg_read_guid(struct ub_entity *uent) 997 { 998 u32 val = 0; 999 int i, ret; 1000 1001 for (i = 0; i < UB_GUID_DW_NUM; i++) { 1002 ret = ub_cfg_read_dword(uent, UB_GUID + i * sizeof(u32), &val); 1003 if (ret) 1004 return ret; 1005 1006 uent->guid.dw[i] = val; 1007 } 1008 1009 return 0; 1010 } 1011 1012 static void ub_enum_destroy_entity(struct ub_entity *uent) 1013 { 1014 message_remove_device(uent); 1015 1016 if (is_primary(uent)) 1017 ub_ubc_put(uent->ubc); 1018 1019 kfree(uent); 1020 } 1021 1022 static struct ub_entity *ub_enum_create_uent(struct ub_bus_controller *ubc) 1023 { 1024 struct ub_entity *uent; 1025 int ret; 1026 1027 uent = ub_alloc_ent(); 1028 if (!uent) 1029 return NULL; 1030 1031 uent->pue = uent; 1032 uent->entity_idx = 0; 1033 uent->ubc = ub_ubc_get(ubc); 1034 uent->upi = UB_CP_UPI; 1035 ret = message_probe_device(uent); 1036 if (ret) { 1037 dev_err(&ubc->dev, "enum msg probe dev failed, ret=%d\n", ret); 1038 goto err_out; 1039 } 1040 1041 return uent; 1042 err_out: 1043 ub_ubc_put(ubc); 1044 kfree(uent); 1045 return NULL; 1046 } 1047 1048 static struct ub_entity *ub_enum_create_bus_controller(struct ub_bus_controller *ubc) 1049 { 1050 struct ub_entity *uent; 1051 int ret; 1052 1053 uent = ub_enum_create_uent(ubc); 1054 if (!uent) 1055 return (struct ub_entity *)ERR_PTR(-ENOMEM); 1056 1057 ubc->uent = uent; 1058 ret = ub_cfg_read_guid(uent); 1059 if (ret) { 1060 dev_err(&ubc->dev, "read guid failed, ret=%d\n", ret); 1061 goto err_out; 1062 } 1063 1064 uent->topo_rank = 0; 1065 uent->dev.parent = &ubc->dev; 1066 1067 return uent; 1068 err_out: 1069 ub_enum_destroy_entity(uent); 1070 return (struct ub_entity *)ERR_PTR(ret); 1071 } 1072 1073 static void ub_enum_topo_ent_uninit(struct ub_entity *uent) 1074 { 1075 if (is_primary(uent)) { 1076 ub_route_clear(uent); /* alloc in route_config */ 1077 ub_cna_free(uent); /* alloc in na_cfg */ 1078 ub_ports_unset(uent); /* alloc in scan_device */ 1079 } 1080 } 1081 1082 static int ub_enum_and_configure_ent(struct ub_entity *uent, void *buf) 1083 { 1084 int ret; 1085 1086 ret = ub_enum_ent(uent, buf); 1087 if (ret) 1088 return ret; 1089 1090 ret = ub_enum_na_cfg(uent, buf); 1091 if (ret) 1092 ub_ports_unset(uent); 1093 1094 return ret; 1095 } 1096 1097 void ub_enum_clear_ent_list(struct list_head *dev_list) 1098 { 1099 struct ub_entity *uent, *tmp; 1100 struct ub_port *port; 1101 1102 list_for_each_entry_safe_reverse(uent, tmp, dev_list, node) { 1103 list_del(&uent->node); 1104 for_each_uent_port(port, uent) 1105 ub_port_disconnect(port); 1106 1107 ub_cna_free(uent); 1108 ub_ports_unset(uent); 1109 ub_enum_destroy_entity(uent); 1110 } 1111 } 1112
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki