RTEMS | dev/serial: Refactor the pl011 driver to be extensible (!47)
Kinsey Moore (@opticron)
gitlab at rtems.org
Wed Aug 28 15:13:18 UTC 2024
Kinsey Moore started a new discussion on bsps/shared/dev/serial/arm-pl011.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111605
> +{
> + uint32_t cr = regs->uartcr;
> + /*
> + * Control: Configure flow control
> + * NOTE: Flow control is untested
> + */
> + cr &= ~(PL011_UARTCR_CTSEN | PL011_UARTCR_RTSEN);
> + if ((term->c_cflag & CCTS_OFLOW) != 0)
> + cr |= PL011_UARTCR_CTSEN;
> + if ((term->c_cflag & CRTS_IFLOW) != 0)
> + cr |= PL011_UARTCR_RTSEN;
> +
> + /* Control: Configure receiver */
> + if ((term->c_cflag & CREAD) != 0)
> + cr |= PL011_UARTCR_RXE;
> +
There are many instances in new code like this where there is a single statement in an if block and the braces are omitted. These all need braces added to them.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111605
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/20240828/8e8f655c/attachment-0001.htm>
More information about the bugs
mailing list