[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b7bf9b6-c676-c1fb-28c9-b46c7d99459a@kernel.org>
Date: Wed, 12 Jul 2023 17:58:42 -0700
From: Vineet Gupta <vgupta@...nel.org>
To: "Jiri Slaby (SUSE)" <jirislaby@...nel.org>,
gregkh@...uxfoundation.org
Cc: linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org,
Vineet Gupta <vgupta@...nel.org>
Subject: Re: [PATCH 08/10] serial: arc_uart: simplify flags handling in
arc_serial_rx_chars()
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@...nel.org>
> Cc: Vineet Gupta<vgupta@...nel.org>
Thanks for the cleanup.
Acked-by: Vineet Gupta <vgupta@...nel.org>
Th,
-Vineet
Powered by blists - more mailing lists