Re: [PATCH 08/10] serial: arc_uart: simplify flags handling in arc_serial_rx_chars()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 7/12/23 01:18, Jiri Slaby (SUSE) wrote:
* move the declaration of flg (with the initializer) to the loop, so
   there is no need to reset it to TTY_NORMAL by an 'else' branch.
* use TTY_NORMAL as initializer above, not a magic zero constant
* remove the outer 'if' from this construct:
   if (S & (A | B)) {
     if (S & A)
       X;
     if (S & B)
       Y;
   }
* drop unlikely() as I doubt it has any benefits here. If it does,
   provide numbers.

All four make the code easier to read.

Signed-off-by: Jiri Slaby (SUSE)<jirislaby@xxxxxxxxxx>
Cc: Vineet Gupta<vgupta@xxxxxxxxxx>

Thanks for the cleanup.

Acked-by: Vineet Gupta <vgupta@xxxxxxxxxx>

Th,
-Vineet



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux