tty: synclink_cs: Use bitwise instead of arithmetic operator for flags
authorHaowen Bai <baihaowen@meizu.com>
Mon, 21 Mar 2022 07:12:37 +0000 (15:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2022 17:42:40 +0000 (19:42 +0200)
This silences the following coccinelle warning:
drivers/s390/char/tape_34xx.c:360:38-39: WARNING: sum of probable bitmasks, consider |

we will try to make code cleaner

Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Link: https://lore.kernel.org/r/1647846757-946-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/pcmcia/synclink_cs.c

index 78baba55a8b5c115950502fea969fb98d0462b33..e6f2186b58819fb4aa99383d048793ff608cbbfa 100644 (file)
@@ -922,7 +922,7 @@ static void rx_ready_async(MGSLPC_INFO *info, int tcd)
                // BIT7:parity error
                // BIT6:framing error
 
-               if (status & (BIT7 + BIT6)) {
+               if (status & (BIT7 | BIT6)) {
                        if (status & BIT7)
                                icount->parity++;
                        else