[PATCH v2 02/15] net/zxdh: zxdh np uninit implementation

Stephen Hemminger stephen at networkplumber.org
Fri Dec 13 20:41:24 CET 2024


On Tue, 10 Dec 2024 13:53:20 +0800
Junlong Wang <wang.junlong1 at zte.com.cn> wrote:

> diff --git a/drivers/net/zxdh/zxdh_np.c b/drivers/net/zxdh/zxdh_np.c
> index 9c50039fb1..454252cffc 100644
> --- a/drivers/net/zxdh/zxdh_np.c
> +++ b/drivers/net/zxdh/zxdh_np.c
> @@ -12,15 +12,26 @@
>  #include "zxdh_logs.h"
>  
>  static uint64_t g_np_bar_offset;
> -static ZXDH_DEV_MGR_T g_dev_mgr = {0};
> -static ZXDH_SDT_MGR_T g_sdt_mgr = {0};
> +static ZXDH_DEV_MGR_T g_dev_mgr;
> +static ZXDH_SDT_MGR_T g_sdt_mgr;
>  ZXDH_PPU_CLS_BITMAP_T g_ppu_cls_bit_map[ZXDH_DEV_CHANNEL_MAX];
>  ZXDH_DTB_MGR_T *p_dpp_dtb_mgr[ZXDH_DEV_CHANNEL_MAX]   = {NULL};
> +ZXDH_RISCV_DTB_MGR *p_riscv_dtb_queue_mgr[ZXDH_DEV_CHANNEL_MAX] = {NULL};
> +ZXDH_TLB_MGR_T *g_p_dpp_tlb_mgr[ZXDH_DEV_CHANNEL_MAX]   = {NULL}

Don't think you to initialize these to NULL since in C global variables
get initialized to 0 automatically.



More information about the dev mailing list