netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: trix@redhat.com
To: yisen.zhuang@huawei.com, salil.mehta@huawei.com,
	davem@davemloft.net, kuba@kernel.org, timur@kernel.org,
	hkallweit1@gmail.com, song.bao.hua@hisilicon.com,
	tariqt@mellanox.com, wanghai38@huawei.com, Jason@zx2c4.com,
	jesse.brandeburg@intel.com, dinghao.liu@zju.edu.cn,
	liguozhu@huawei.com, huangdaode@hisilicon.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tom Rix <trix@redhat.com>
Subject: [PATCH] net: hns: fix variable used when DEBUG is defined
Date: Sun, 17 Jan 2021 11:10:44 -0800	[thread overview]
Message-ID: <20210117191044.533725-1-trix@redhat.com> (raw)

From: Tom Rix <trix@redhat.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@redhat.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


             reply	other threads:[~2021-01-17 19:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 19:10 trix [this message]
2021-01-19  5:50 ` [PATCH] net: hns: fix variable used when DEBUG is defined patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210117191044.533725-1-trix@redhat.com \
    --to=trix@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=dinghao.liu@zju.edu.cn \
    --cc=hkallweit1@gmail.com \
    --cc=huangdaode@hisilicon.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=liguozhu@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=song.bao.hua@hisilicon.com \
    --cc=tariqt@mellanox.com \
    --cc=timur@kernel.org \
    --cc=wanghai38@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).