gpoulios commented on code in PR #16356:
URL: https://github.com/apache/nuttx/pull/16356#discussion_r2083464712


##########
drivers/misc/optee.h:
##########
@@ -46,17 +45,19 @@
  * Public Types
  ****************************************************************************/
 
-struct optee_shm_entry
+struct optee_priv_data
 {
-  struct list_node node;
-  struct tee_ioctl_shm_register_data shm;
+  uintptr_t alignment;        /* Transport-specified message alignment */
+  FAR struct idr_s *shms;     /* An RB tree of all shm entries */
 };
 
-struct optee_priv_data
+struct optee_shm_entry
 {
-  uintptr_t alignment;        /* Transport-specified message alignment */
-  struct list_node shm_list;  /* A list of all shm registered */
-  spinlock_t lock;            /* Lock used to guard list accesses */
+  FAR struct optee_priv_data *priv;
+  int32_t id;

Review Comment:
   I don't see how this avoids the padding. I can only see how moving perhaps 
`flags` to the end of the struct perhaps avoids the padding. What am I missing?
   
   ```
   {
     <dword> : priv
     <word>  : fd
     <word>  : id
     <dword> : addr
     <dword> : length
   [...]
   }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to