Skip to contentSkip to conversation

cdc-eem: always use BIT

PATCH Applied Oliver Neukum 2 participants 2 messages Jun 30, 2022 – Jul 1, 2022

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cdc-eem: always use BIT

Either you use BIT(x) or 1 << x in the same expression. Mixing them is ridiculous. Go to BIT()

---
 drivers/net/usb/cdc_eem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/cdc_eem.c +1 -1
index 359ea0d10e59..baa9b14b1644 100644
@@ -218,7 +218,7 @@ static int eem_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
 				if (unlikely(!skb2))
 					goto next;
 				skb_trim(skb2, len);
-				put_unaligned_le16(BIT(15) | (1 << 11) | len,
+				put_unaligned_le16(BIT(15) | BIT(11) | len,
 						skb_push(skb2, 2));
 				eem_linkcmd(dev, skb2);
 				break;
Signature · 1 line
2.35.3
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 7 lines · On Thu, 30 Jun 2022 13:51:09 +0200 you wrote:

Either you use BIT(x) or 1 << x in the same expression. Mixing them is ridiculous. Go to BIT()

---
 drivers/net/usb/cdc_eem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- cdc-eem: always use BIT

    https://git.kernel.org/netdev/net-next/c/7fa2d1707d41

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html