[openeuler:OLK-6.6 2455/2455] drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:10: error: positional initialization of field in 'struct' declared with 'designated_init' attribute

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 9b85bcf0e6357841885264f42859bec05c9073f4 commit: 4213ff7957de370c1cfe528c2bad1eb2e499038a [2455/2455] net/ethernet/huawei/hinic3: Add the CQM on which the RDMA depends config: x86_64-buildonly-randconfig-006-20250704 (https://download.01.org/0day-ci/archive/20250704/202507040507.d8CCXDl2-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250704/202507040507.d8CCXDl2-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/202507040507.d8CCXDl2-lkp@intel.com/ All errors (new ones prefixed by >>):
drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:10: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 371 | {check_for_use_node_alloc, cqm_buf_use_node_alloc_page}, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:10: note: (near initialization for 'g_malloc_funcs[0]') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:10: error: invalid initializer drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:10: note: (near initialization for 'g_malloc_funcs[0].<anonymous>') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:36: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 371 | {check_for_use_node_alloc, cqm_buf_use_node_alloc_page}, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:36: note: (near initialization for 'g_malloc_funcs[0]') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:36: error: initialization of 'bool (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)' {aka '_Bool (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)'} from incompatible pointer type 's32 (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)' {aka 'int (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)'} [-Werror=incompatible-pointer-types] drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:371:36: note: (near initialization for 'g_malloc_funcs[0].check_alloc_mode') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:10: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 372 | {check_for_nouse_node_alloc, cqm_buf_unused_node_alloc_page} | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:10: note: (near initialization for 'g_malloc_funcs[1]') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:10: error: invalid initializer drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:10: note: (near initialization for 'g_malloc_funcs[1].<anonymous>') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:38: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 372 | {check_for_nouse_node_alloc, cqm_buf_unused_node_alloc_page} | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:38: note: (near initialization for 'g_malloc_funcs[1]') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:38: error: initialization of 'bool (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)' {aka '_Bool (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)'} from incompatible pointer type 's32 (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)' {aka 'int (*)(struct hinic3_hwdev *, struct tag_cqm_buf *)'} [-Werror=incompatible-pointer-types] drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:372:38: note: (near initialization for 'g_malloc_funcs[1].check_alloc_mode') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:10: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 376 | {check_use_non_vram, cqm_buf_free_page_common} | ^~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:10: note: (near initialization for 'g_free_funcs[0]') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:10: error: invalid initializer drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:10: note: (near initialization for 'g_free_funcs[0].<anonymous>') drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:30: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init] 376 | {check_use_non_vram, cqm_buf_free_page_common} | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c:376:30: note: (near initialization for 'g_free_funcs[0]') cc1: some warnings being treated as errors
vim +371 drivers/net/ethernet/huawei/hinic3/cqm/cqm_bitmap_table.c 369 370 static const struct malloc_memory g_malloc_funcs[] = {
371 {check_for_use_node_alloc, cqm_buf_use_node_alloc_page}, 372 {check_for_nouse_node_alloc, cqm_buf_unused_node_alloc_page} 373 }; 374
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot