diff mbox series

[v1] stack: remove duplicated include of atomic

Message ID 20210823032034.12688-1-joyce.kong@arm.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers show
Series [v1] stack: remove duplicated include of atomic | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Joyce Kong Aug. 23, 2021, 3:20 a.m. UTC
In stack module, remove the duplicated header file rte_atomic.h
as it has been included in rte_spinlock.h/rte_pause.h

Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test/test_stack.c | 1 -
 lib/stack/rte_stack.c | 1 -
 lib/stack/rte_stack.h | 1 -
 3 files changed, 3 deletions(-)

Comments

Olivier Matz Sept. 27, 2021, 7:27 p.m. UTC | #1
Hi Joyce,

On Sun, Aug 22, 2021 at 10:20:34PM -0500, Joyce Kong wrote:
> In stack module, remove the duplicated header file rte_atomic.h
> as it has been included in rte_spinlock.h/rte_pause.h
> 
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

Sorry for the late feedback.

No objection about the patch itself, but I don't think the commit log
should say that rte_atomic.h is indirectly included by
rte_spinlock.h/rte_pause.h.

To me, it is not a good reason to remove an include. However, it looks
that no function from rte_atomic.h is used in these files, especially
since commit c51e67c2ee18 ("test/stack: remove thread synchronisation")
for the test app.

Thanks,
Olivier
diff mbox series

Patch

diff --git a/app/test/test_stack.c b/app/test/test_stack.c
index 00efb38e2a..bc38961433 100644
--- a/app/test/test_stack.c
+++ b/app/test/test_stack.c
@@ -4,7 +4,6 @@ 
 
 #include <string.h>
 
-#include <rte_atomic.h>
 #include <rte_lcore.h>
 #include <rte_malloc.h>
 #include <rte_random.h>
diff --git a/lib/stack/rte_stack.c b/lib/stack/rte_stack.c
index f1cbb9803f..d3bfc57955 100644
--- a/lib/stack/rte_stack.c
+++ b/lib/stack/rte_stack.c
@@ -5,7 +5,6 @@ 
 #include <string.h>
 
 #include <rte_string_fns.h>
-#include <rte_atomic.h>
 #include <rte_eal.h>
 #include <rte_eal_memconfig.h>
 #include <rte_errno.h>
diff --git a/lib/stack/rte_stack.h b/lib/stack/rte_stack.h
index 27640f87b2..321f4cec1a 100644
--- a/lib/stack/rte_stack.h
+++ b/lib/stack/rte_stack.h
@@ -19,7 +19,6 @@ 
 extern "C" {
 #endif
 
-#include <rte_atomic.h>
 #include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_errno.h>