netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: hns: fix variable used when DEBUG is defined
@ 2021-01-17 19:10 trix
  2021-01-19  5:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: trix @ 2021-01-17 19:10 UTC (permalink / raw)
  To: yisen.zhuang, salil.mehta, davem, kuba, timur, hkallweit1,
	song.bao.hua, tariqt, wanghai38, Jason, jesse.brandeburg,
	dinghao.liu, liguozhu, huangdaode
  Cc: netdev, linux-kernel, Tom Rix

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: hns: fix variable used when DEBUG is defined
  2021-01-17 19:10 [PATCH] net: hns: fix variable used when DEBUG is defined trix
@ 2021-01-19  5:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-19  5:50 UTC (permalink / raw)
  To: Tom Rix
  Cc: yisen.zhuang, salil.mehta, davem, kuba, timur, hkallweit1,
	song.bao.hua, tariqt, wanghai38, Jason, jesse.brandeburg,
	dinghao.liu, liguozhu, huangdaode, netdev, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Sun, 17 Jan 2021 11:10:44 -0800 you wrote:
> 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);
>                                     ^~~~~~~~~
> 
> [...]

Here is the summary with links:
  - net: hns: fix variable used when DEBUG is defined
    https://git.kernel.org/netdev/net-next/c/99d518970c5a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-19  6:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-17 19:10 [PATCH] net: hns: fix variable used when DEBUG is defined trix
2021-01-19  5:50 ` patchwork-bot+netdevbpf

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).