[20.05,01/15] app/bbdev: replace constructor syntax with common macro
diff mbox series

Message ID 20200210162032.1177478-2-thomas@monjalon.net
State Superseded, 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/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Feb. 10, 2020, 4:20 p.m. UTC
There is a macro RTE_INIT for constructors,
which is now used where appropriate for consistency.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 app/test-bbdev/main.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Chautru, Nicolas Feb. 10, 2020, 9:06 p.m. UTC | #1
On 2/10/20 8:20 AM, Thomas Monjalon wrote:
> There is a macro RTE_INIT for constructors, which is now used where
> appropriate for consistency.
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Nic Chautru <nicolas.chautru@intel.com>

Patch
diff mbox series

diff --git a/app/test-bbdev/main.h b/app/test-bbdev/main.h
index 23b4d58a53..836f6d6efd 100644
--- a/app/test-bbdev/main.h
+++ b/app/test-bbdev/main.h
@@ -104,8 +104,7 @@  void add_test_command(struct test_command *t);
 		.command = RTE_STR(name), \
 		.callback = test_func_##name, \
 	}; \
-	static void __attribute__((constructor, used)) \
-	test_register_##name(void) \
+	RTE_INIT(test_register_##name) \
 	{ \
 		add_test_command(&test_struct_##name); \
 	}