RTEMS | cpukit/dev: reformat (!989)
Gedare Bloom (@gedare)
gitlab at rtems.org
Thu Feb 5 17:46:40 UTC 2026
Gedare Bloom commented on a discussion on cpukit/include/dev/can/can-helpers.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/989#note_141752
> #define FIELD_PREP( _mask, _val ) \
> - ({ \
> - ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask); \
> - })
> + ( { ( (typeof( _mask )) ( _val ) << __bf_shf( _mask ) ) & ( _mask ); } )
> #endif
>
> #ifndef FIELD_GET
> #define FIELD_GET( _mask, _reg ) \
> - ({ \
> - (typeof(_mask))(((_reg) & (_mask)) >> __bf_shf(_mask)); \
> - })
> + ( { (typeof( _mask )) ( ( ( _reg ) & ( _mask ) ) >> __bf_shf( _mask ) ); } )
> #endif
>
> -static const uint8_t rtems_can_len2dlc[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, /* 0 - 8 */
Good catch, I disabled formatting (and manually made it look a little cleaner)
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/989#note_141752
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260205/ca0a8318/attachment-0001.htm>
More information about the bugs
mailing list