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