From: Thomas Monjalon Date: Sun, 9 Feb 2020 20:33:29 +0000 (+0100) Subject: net/mlx5: replace destructor syntax with common macro X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bf9fadacb56c55f28e2fbc9d725b7853001649ed;p=dpdk.git 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 --- 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;