Matteo Concas commented on a discussion on bsps/shared/grlib/can/grcanfd.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/390#note_119207 > return GRCAN_RET_INVARG; > break; > } > - dest->head[1] = (dlc << 28) | > + dest->head[1] = ((dlc & 0xf) << 28) | Doing so would result in an implicit conversion in the current driver state which I don't really like. It would also break with how things are done to check for errors (checking if it's smaller than 0) in the file. The mask, I believe, is also good from a readability perspective. One can quickly see that only the first 4 bits are valid for this var by simply reading the source code. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/390#note_119207 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list bugs@rtems.org http://lists.rtems.org/mailman/listinfo/bugs