raiden00pl commented on code in PR #21638:
URL: https://github.com/apache/nuttx/pull/21638#discussion_r4535325083


##########
drivers/can/ctucanfd_pci.c:
##########
@@ -1170,10 +1182,19 @@ static int ctucanfd_sock_transmit(FAR struct 
netdev_lowerhalf_s *dev,
       ctucanfd_putreg(priv, offset + CTUCANFD_TXBUF_TSL, 0);
       ctucanfd_putreg(priv, offset + CTUCANFD_TXBUF_TSU, 0);
 
-      for (i = 0; i < frame->can_dlc; i++)
+      /* Pack bytes into aligned register writes and pad the final word. */
+
+      for (i = 0; i < frame->can_dlc; i += 4)

Review Comment:
   can_dlc can be > 8 if this is FD CAN frame



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to