diff options
| author | Jiri Slaby <[email protected]> | 2023-07-12 08:18:09 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-07-25 17:21:03 +0000 |
| commit | 29ec63ef16fce338774b9ba306ea530190bf772a (patch) | |
| tree | 9f17df7c743724cbfe262c3a2acaea47fc54ed33 /drivers/tty/serial/sccnxp.c | |
| parent | serial: pass state to __uart_start() directly (diff) | |
| download | kernel-29ec63ef16fce338774b9ba306ea530190bf772a.tar.gz kernel-29ec63ef16fce338774b9ba306ea530190bf772a.zip | |
serial: arc_uart: simplify flags handling in arc_serial_rx_chars()
* 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) <[email protected]>
Cc: Vineet Gupta <[email protected]>
Acked-by: Vineet Gupta <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
0 files changed, 0 insertions, 0 deletions
