[20.05,02/15] net/mlx5: replace destructor syntax with common macro
diff mbox series

Message ID 20200210162032.1177478-3-thomas@monjalon.net
State Accepted, archived
Delegated to: David Marchand
Headers show
Series
  • clean-up use of __attribute__
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Feb. 10, 2020, 4:20 p.m. UTC
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 <thomas@monjalon.net>
---
 drivers/net/mlx5/mlx5.h        | 1 -
 drivers/net/mlx5/mlx5_socket.c | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

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;