Browse Source

realtek: Don't reinitialize static variables to 0

Static variables (and global variables) are initialized to 0 by
default. It is not needed and discouraged to reinitialize them
to 0.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20906
Signed-off-by: Hauke Mehrtens <[email protected]>
Sven Eckelmann 1 month ago
parent
commit
612f1e6afb

+ 1 - 1
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

@@ -1142,7 +1142,7 @@ txdone:
 static u16 rtl83xx_pick_tx_queue(struct net_device *dev, struct sk_buff *skb,
 			  struct net_device *sb_dev)
 {
-	static u8 last = 0;
+	static u8 last;
 
 	last++;
 	return last % TXRINGS;