From bf9fadacb56c55f28e2fbc9d725b7853001649ed Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Sun, 9 Feb 2020 21:33:29 +0100 Subject: [PATCH] net/mlx5: replace destructor syntax with common macro 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 --- 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 @@ error: /** * Un-Initialize the pmd socket */ -void __attribute__((destructor)) -mlx5_pmd_socket_uninit(void) +RTE_FINI(mlx5_pmd_socket_uninit) { if (!server_socket) return; -- 2.20.1