realtek: Don't reinitialize static variables to 0
authorSven Eckelmann <[email protected]>
Sun, 23 Nov 2025 16:04:21 +0000 (17:04 +0100)
committerHauke Mehrtens <[email protected]>
Mon, 24 Nov 2025 23:28:50 +0000 (00:28 +0100)
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]>
target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c

index 61dbb149ee13323615f896a2a59ec3f4b689137c..6beab1c7f31b788adc0a120d575896d3d05e1b30 100644 (file)
@@ -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;