提交 50698d80 编写于 作者: S stephen hemminger 提交者: David S. Miller

netvsc: don't overload variable in same function

There are two variables named packet in the same function. One is the
metadata descriptor from host (vmpacket_descriptor) and the other is
the control block in the skb used to hold metadata from send.
Change name to avoid possible confusion and bugs.
Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1a4691b2
...@@ -600,9 +600,9 @@ static inline void netvsc_free_send_slot(struct netvsc_device *net_device, ...@@ -600,9 +600,9 @@ static inline void netvsc_free_send_slot(struct netvsc_device *net_device,
static void netvsc_send_tx_complete(struct netvsc_device *net_device, static void netvsc_send_tx_complete(struct netvsc_device *net_device,
struct vmbus_channel *incoming_channel, struct vmbus_channel *incoming_channel,
struct hv_device *device, struct hv_device *device,
struct vmpacket_descriptor *packet) const struct vmpacket_descriptor *desc)
{ {
struct sk_buff *skb = (struct sk_buff *)(unsigned long)packet->trans_id; struct sk_buff *skb = (struct sk_buff *)(unsigned long)desc->trans_id;
struct net_device *ndev = hv_get_drvdata(device); struct net_device *ndev = hv_get_drvdata(device);
struct net_device_context *net_device_ctx = netdev_priv(ndev); struct net_device_context *net_device_ctx = netdev_priv(ndev);
struct vmbus_channel *channel = device->channel; struct vmbus_channel *channel = device->channel;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册