]> git.baikalelectronics.ru Git - kernel.git/commitdiff
can: slcan: use the BIT() helper
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Tue, 28 Jun 2022 16:31:25 +0000 (18:31 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 3 Jul 2022 09:34:13 +0000 (11:34 +0200)
Use the BIT() helper instead of an explicit shift.

Link: https://lore.kernel.org/all/20220628163137.413025-2-dario.binacchi@amarulasolutions.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Tested-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/slcan.c

index 64a3aee8a7da6f8de3f7ebe5112fdfa2d342f6ab..b37d35c2a23ac8b34bd1591094d4e1485eadcb60 100644 (file)
@@ -413,7 +413,7 @@ static int slc_open(struct net_device *dev)
        if (sl->tty == NULL)
                return -ENODEV;
 
-       sl->flags &= (1 << SLF_INUSE);
+       sl->flags &= BIT(SLF_INUSE);
        netif_start_queue(dev);
        return 0;
 }