Skip to contentSkip to conversation

tools: hv: remove unused rte_smp_mb()

PATCH Applied Sasha Levin 4 participants 4 messages Oct 11 – Oct 21

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: hv: remove unused rte_smp_mb()

rte_smp_mb() has never been used, and its "static inline __always_inline" declares inline twice, so clang warns:

vmbus_bufring.c:61:15: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier] vmbus_bufring.c:62:1: warning: unused function 'rte_smp_mb' [-Wunused-function]

Remove it.

Fixes 45bab4d746510 ("tools: hv: Add vmbus_bufring")
Assisted-by LLM
---
 tools/hv/vmbus_bufring.c | 6 ------
 1 file changed, 6 deletions(-)
tools/hv/vmbus_bufring.c +0 -6
index bac32c1109df8..23542e59a2ee9 100644
@@ -58,12 +58,6 @@ void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen)
 	br->dsize = blen - sizeof(struct vmbus_bufring);
 }
 
-static inline __always_inline void
-rte_smp_mb(void)
-{
-	asm volatile("lock addl $0, -128(%%rsp); " ::: "memory");
-}
-
 static inline int
 rte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_t src)
 {
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Sasha Levin

rte_smp_mb() has never been used, and its "static inline __always_inline" declares inline twice, so clang warns:

vmbus_bufring.c:61:15: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier] vmbus_bufring.c:62:1: warning: unused function 'rte_smp_mb' [-Wunused-function]

Remove it.

Fixes 45bab4d746510 ("tools: hv: Add vmbus_bufring")
Assisted-by LLM
Quoted 24 lines
---
 tools/hv/vmbus_bufring.c | 6 ------
 1 file changed, 6 deletions(-)
tools/hv/vmbus_bufring.c +0 -6
index bac32c1109df8..23542e59a2ee9 100644
@@ -58,12 +58,6 @@ void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen)
 	br->dsize = blen - sizeof(struct vmbus_bufring);
 }
 
-static inline __always_inline void
-rte_smp_mb(void)
-{
-	asm volatile("lock addl $0, -128(%%rsp); " ::: "memory");
-}
-
 static inline int
 rte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_t src)
 {
Signature · 1 line
2.53.0
Acked-by on v1 1/1
#2 lore raw
In reply to Sasha Levin
Quoted 34 lines · Sasha Levin

rte_smp_mb() has never been used, and its "static inline __always_inline" declares inline twice, so clang warns:

vmbus_bufring.c:61:15: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier] vmbus_bufring.c:62:1: warning: unused function 'rte_smp_mb' [-Wunused-function]

Remove it.

Fixes 45bab4d746510 ("tools: hv: Add vmbus_bufring")
Assisted-by LLM
---
 tools/hv/vmbus_bufring.c | 6 ------
 1 file changed, 6 deletions(-)
tools/hv/vmbus_bufring.c +0 -6
index bac32c1109df8..23542e59a2ee9 100644
@@ -58,12 +58,6 @@ void vmbus_br_setup(struct vmbus_br *br, void *buf, unsigned int blen)
 	br->dsize = blen - sizeof(struct vmbus_bufring);
 }
 
-static inline __always_inline void
-rte_smp_mb(void)
-{
-	asm volatile("lock addl $0, -128(%%rsp); " ::: "memory");
-}
-
 static inline int
 rte_atomic32_cmpset(volatile uint32_t *dst, uint32_t exp, uint32_t src)
 {
Signature · 1 line
2.53.0
maintainer Applied
#3 lore raw
In reply to Sasha Levin
Quoted 11 lines · Sasha Levin

rte_smp_mb() has never been used, and its "static inline __always_inline" declares inline twice, so clang warns:

vmbus_bufring.c:61:15: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier] vmbus_bufring.c:62:1: warning: unused function 'rte_smp_mb' [-Wunused-function]

Remove it.

Fixes 45bab4d746510 ("tools: hv: Add vmbus_bufring")
Assisted-by LLM

Applied.