[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210117191044.533725-1-trix@redhat.com>
Date: Sun, 17 Jan 2021 11:10:44 -0800
From: trix@...hat.com
To: yisen.zhuang@...wei.com, salil.mehta@...wei.com,
davem@...emloft.net, kuba@...nel.org, timur@...nel.org,
hkallweit1@...il.com, song.bao.hua@...ilicon.com,
tariqt@...lanox.com, wanghai38@...wei.com, Jason@...c4.com,
jesse.brandeburg@...el.com, dinghao.liu@....edu.cn,
liguozhu@...wei.com, huangdaode@...ilicon.com
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Tom Rix <trix@...hat.com>
Subject: [PATCH] net: hns: fix variable used when DEBUG is defined
From: Tom Rix <trix@...hat.com>
When DEBUG is defined this error occurs
drivers/net/ethernet/hisilicon/hns/hns_enet.c:1505:36: error:
‘struct net_device’ has no member named ‘ae_handle’;
did you mean ‘rx_handler’?
assert(skb->queue_mapping < ndev->ae_handle->q_num);
^~~~~~~~~
ae_handle is an element of struct hns_nic_priv, so change
ndev to priv.
Fixes: b5996f11ea54 ("net: add Hisilicon Network Subsystem basic ethernet support")
Signed-off-by: Tom Rix <trix@...hat.com>
---
drivers/net/ethernet/hisilicon/hns/hns_enet.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 858cb293152a..5d7824d2b4d4 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -1502,7 +1502,7 @@ static netdev_tx_t hns_nic_net_xmit(struct sk_buff *skb,
{
struct hns_nic_priv *priv = netdev_priv(ndev);
- assert(skb->queue_mapping < ndev->ae_handle->q_num);
+ assert(skb->queue_mapping < priv->ae_handle->q_num);
return hns_nic_net_xmit_hw(ndev, skb,
&tx_ring_data(priv, skb->queue_mapping));
--
2.27.0
Powered by blists - more mailing lists