mt76: replace consume_skb with dev_kfree_skb
diff mbox series

Message ID b90644567e758b5702e37e34e31f2007e3bd2c87.1586290996.git.sean.wang@mediatek.com
State New
Headers show
Series
  • mt76: replace consume_skb with dev_kfree_skb
Related show

Commit Message

Sean Wang April 7, 2020, 8:25 p.m. UTC
From: Sean Wang <sean.wang@mediatek.com>

consume_skb is identical to dev_kfree_skb, so that replace consume_skb with
dev_kfree_skb just to make consistent in whole mt76 driver.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arend Van Spriel April 13, 2020, 6:48 a.m. UTC | #1
On 4/7/2020 10:25 PM, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> consume_skb is identical to dev_kfree_skb, so that replace consume_skb with
> dev_kfree_skb just to make consistent in whole mt76 driver.

Given that dev_kfree_skb is a define that maps it to consume_skb I would 
say the use of consume_skb() is preferred. So maybe better to get 
consistency in the driver by replacing dev_kfree_skb with consume_skb.

Regards,
Arend

Patch
diff mbox series

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
index a30bb536fc8a..28567e2e4a65 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
@@ -111,7 +111,7 @@  __mt76x02u_mcu_send_msg(struct mt76_dev *dev, struct sk_buff *skb,
 	if (wait_resp)
 		ret = mt76x02u_mcu_wait_resp(dev, seq);
 
-	consume_skb(skb);
+	dev_kfree_skb(skb);
 
 	return ret;
 }