[38/83] ml/cnxk: move alignment attribute on types

Message ID 1710949096-5786-39-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/ml/cnxk/cnxk_ml_ops.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/ml/cnxk/cnxk_ml_ops.h b/drivers/ml/cnxk/cnxk_ml_ops.h
index 7b49793..e348cc4 100644
--- a/drivers/ml/cnxk/cnxk_ml_ops.h
+++ b/drivers/ml/cnxk/cnxk_ml_ops.h
@@ -19,7 +19,7 @@ 
 #endif
 
 /* Request structure */
-struct cnxk_ml_req {
+struct __rte_aligned(ROC_ALIGN) cnxk_ml_req {
 	/* Device specific request */
 	union {
 		/* CN10K */
@@ -39,7 +39,7 @@  struct cnxk_ml_req {
 
 	/* Op */
 	struct rte_ml_op *op;
-} __rte_aligned(ROC_ALIGN);
+};
 
 /* Request queue */
 struct cnxk_ml_queue {