[47/83] dma/skeleton: move alignment attribute on types

Message ID 1710949096-5786-48-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers
Series move alignment attribute on types |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 20, 2024, 3:37 p.m. UTC
  Move location of __rte_aligned(a) to new conventional location. The new
placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for both C and C++. Additionally, it avoids confusion by Doxygen
when generating documentation.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/dma/skeleton/skeleton_dmadev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/dma/skeleton/skeleton_dmadev.h b/drivers/dma/skeleton/skeleton_dmadev.h
index c9bf315..cfd37d1 100644
--- a/drivers/dma/skeleton/skeleton_dmadev.h
+++ b/drivers/dma/skeleton/skeleton_dmadev.h
@@ -73,13 +73,13 @@  struct skeldma_hw {
 	struct rte_ring *desc_completed;
 
 	/* Cache delimiter for dataplane API's operation data */
-	char cache1 __rte_cache_aligned;
+	alignas(RTE_CACHE_LINE_SIZE) char cache1;
 	uint16_t ridx;  /* ring idx */
 	uint16_t last_ridx;
 	uint64_t submitted_count;
 
 	/* Cache delimiter for cpuwork thread's operation data */
-	char cache2 __rte_cache_aligned;
+	alignas(RTE_CACHE_LINE_SIZE) char cache2;
 	volatile uint32_t zero_req_count;
 	uint64_t completed_count;
 };