You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/17 15:32:09 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5249: Fix aligment issue: pktbuf needs to be 16bit aligned

pkarashchenko commented on a change in pull request #5249:
URL: https://github.com/apache/incubator-nuttx/pull/5249#discussion_r786112280



##########
File path: drivers/usbdev/cdcecm.c
##########
@@ -120,7 +120,7 @@ struct cdcecm_driver_s
   FAR struct usbdev_ep_s      *epbulkout;   /* Bulk OUT endpoint */
   uint8_t                      config;      /* Selected configuration number */
 
-  uint8_t                      pktbuf[CONFIG_NET_ETH_PKTSIZE +
+  aligned_data(2) uint8_t      pktbuf[CONFIG_NET_ETH_PKTSIZE +

Review comment:
       Maybe it is reasonable to change type from `uint8_t` to `uint32_t` and allocate in 32 bit words? This will eliminate dependencies to compiler.h.




-- 
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-unsubscribe@nuttx.apache.org

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