Skip to contentSkip to conversation

r8169: silence sparse warning in rtl8169_start_xmit

PATCH Applied Heiner Kallweit 2 participants 2 messages Jun 6, 2019

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: silence sparse warning in rtl8169_start_xmit

The opts[] array is of type u32. Therefore remove the wrong cpu_to_le32(). The opts[] array members are converted to little endian later when being assigned to the respective descriptor fields.

This is not a new issue, it just popped up due to r8169.c having been renamed and more thoroughly checked. Due to the renaming this patch applies to net-next only.

---
 drivers/net/ethernet/realtek/r8169_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169_main.c +1 -1
index d34cc855f..8b7d45ff1 100644
@@ -5621,7 +5621,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
 	if (unlikely(le32_to_cpu(txd->opts1) & DescOwn))
 		goto err_stop_0;
 
-	opts[1] = cpu_to_le32(rtl8169_tx_vlan_tag(skb));
+	opts[1] = rtl8169_tx_vlan_tag(skb);
 	opts[0] = DescOwn;
 
 	if (rtl_chip_supports_csum_v2(tp)) {
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Thu, 6 Jun 2019 07:49:17 +0200

Quoted 10 lines

The opts[] array is of type u32. Therefore remove the wrong cpu_to_le32(). The opts[] array members are converted to little endian later when being assigned to the respective descriptor fields.

This is not a new issue, it just popped up due to r8169.c having been renamed and more thoroughly checked. Due to the renaming this patch applies to net-next only.

Applied.