Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: gs_usb: codingstyle: introduce use of BIT() + fix indention

This patch converts "1 << n" by BIT(n) and fixes the indention. No
functional change.

Signed-off-by: Hubert Denkmair <hubert@denkmair.de>
Signed-off-by: Maximilian Schneider <max@schneidersoft.net>
[mkl: split codingstyle changes into separate patch]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>

authored by

Maximilian Schneider and committed by
Marc Kleine-Budde
9be95c91 ae5ac9b3

+14 -11
+14 -11
drivers/net/can/usb/gs_usb.c
··· 77 77 } __packed; 78 78 79 79 #define GS_CAN_MODE_NORMAL 0 80 - #define GS_CAN_MODE_LISTEN_ONLY (1<<0) 81 - #define GS_CAN_MODE_LOOP_BACK (1<<1) 82 - #define GS_CAN_MODE_TRIPLE_SAMPLE (1<<2) 83 - #define GS_CAN_MODE_ONE_SHOT (1<<3) 80 + #define GS_CAN_MODE_LISTEN_ONLY BIT(0) 81 + #define GS_CAN_MODE_LOOP_BACK BIT(1) 82 + #define GS_CAN_MODE_TRIPLE_SAMPLE BIT(2) 83 + #define GS_CAN_MODE_ONE_SHOT BIT(3) 84 84 85 85 struct gs_device_mode { 86 86 u32 mode; ··· 101 101 u32 brp; 102 102 } __packed; 103 103 104 - #define GS_CAN_FEATURE_LISTEN_ONLY (1<<0) 105 - #define GS_CAN_FEATURE_LOOP_BACK (1<<1) 106 - #define GS_CAN_FEATURE_TRIPLE_SAMPLE (1<<2) 107 - #define GS_CAN_FEATURE_ONE_SHOT (1<<3) 104 + #define GS_CAN_FEATURE_LISTEN_ONLY BIT(0) 105 + #define GS_CAN_FEATURE_LOOP_BACK BIT(1) 106 + #define GS_CAN_FEATURE_TRIPLE_SAMPLE BIT(2) 107 + #define GS_CAN_FEATURE_ONE_SHOT BIT(3) 108 108 109 109 struct gs_device_bt_const { 110 110 u32 feature; ··· 209 209 210 210 /* Get a tx context by id. 211 211 */ 212 - static struct gs_tx_context *gs_get_tx_context(struct gs_can *dev, unsigned int id) 212 + static struct gs_tx_context *gs_get_tx_context(struct gs_can *dev, 213 + unsigned int id) 213 214 { 214 215 unsigned long flags; 215 216 ··· 453 452 netif_wake_queue(netdev); 454 453 } 455 454 456 - static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb, struct net_device *netdev) 455 + static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb, 456 + struct net_device *netdev) 457 457 { 458 458 struct gs_can *dev = netdev_priv(netdev); 459 459 struct net_device_stats *stats = &dev->netdev->stats; ··· 660 658 rc = usb_control_msg(interface_to_usbdev(dev->iface), 661 659 usb_sndctrlpipe(interface_to_usbdev(dev->iface), 0), 662 660 GS_USB_BREQ_MODE, 663 - USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE, 661 + USB_DIR_OUT | USB_TYPE_VENDOR | 662 + USB_RECIP_INTERFACE, 664 663 dev->channel, 665 664 0, 666 665 dm,