There is a macro RTE_FINI for destructors, which is now used where appropriate for consistency.
The destructor function mlx5_pmd_socket_uninit does not need to be declared separately in mlx5.h. Signed-off-by: Thomas Monjalon <tho...@monjalon.net> --- drivers/net/mlx5/mlx5.h | 1 - drivers/net/mlx5/mlx5_socket.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index d7c519bae0..2affcd2ba3 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -764,7 +764,6 @@ void mlx5_mp_uninit_secondary(void); /* mlx5_socket.c */ int mlx5_pmd_socket_init(void); -void mlx5_pmd_socket_uninit(void); /* mlx5_flow_meter.c */ diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c index cf2b433c00..a79896cb33 100644 --- a/drivers/net/mlx5/mlx5_socket.c +++ b/drivers/net/mlx5/mlx5_socket.c @@ -218,8 +218,7 @@ mlx5_pmd_socket_init(void) /** * Un-Initialize the pmd socket */ -void __attribute__((destructor)) -mlx5_pmd_socket_uninit(void) +RTE_FINI(mlx5_pmd_socket_uninit) { if (!server_socket) return; -- 2.25.0