netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats
@ 2018-10-18  8:02 Dan Carpenter
  2018-10-18 14:32 ` Michael Chan
  2018-10-18 22:59 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2018-10-18  8:02 UTC (permalink / raw)
  To: Michael Chan; +Cc: David S. Miller, netdev, kernel-janitors

The struct type was copied from the line before but it should be "tx"
instead of "rx".  I have reviewed the code and I can't immediately see
that this bug causes a runtime issue.

Fixes: 36e53349b60b ("bnxt_en: Add additional extended port statistics.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This is from static analysis and I don't have a way to test it.

 drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.h b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
index 0fe57e36912b..498b373c992d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.h
@@ -1471,7 +1471,7 @@ struct bnxt {
 	struct rx_port_stats	*hw_rx_port_stats;
 	struct tx_port_stats	*hw_tx_port_stats;
 	struct rx_port_stats_ext	*hw_rx_port_stats_ext;
-	struct rx_port_stats_ext	*hw_tx_port_stats_ext;
+	struct tx_port_stats_ext	*hw_tx_port_stats_ext;
 	dma_addr_t		hw_rx_port_stats_map;
 	dma_addr_t		hw_tx_port_stats_map;
 	dma_addr_t		hw_rx_port_stats_ext_map;
-- 
2.11.0

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

* Re: [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats
  2018-10-18  8:02 [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats Dan Carpenter
@ 2018-10-18 14:32 ` Michael Chan
  2018-10-18 22:59 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Chan @ 2018-10-18 14:32 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: David Miller, Netdev, kernel-janitors

On Thu, Oct 18, 2018 at 1:02 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> The struct type was copied from the line before but it should be "tx"
> instead of "rx".  I have reviewed the code and I can't immediately see
> that this bug causes a runtime issue.
>
> Fixes: 36e53349b60b ("bnxt_en: Add additional extended port statistics.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thanks.  Luckily, we did not use sizeof(*bp->hw_tx_port_stats_ext) to
allocate the memory, so there is no run-time issue.

Acked-by: Michael Chan <michael.chan@broadcom.com>

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

* Re: [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats
  2018-10-18  8:02 [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats Dan Carpenter
  2018-10-18 14:32 ` Michael Chan
@ 2018-10-18 22:59 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-10-18 22:59 UTC (permalink / raw)
  To: dan.carpenter; +Cc: michael.chan, netdev, kernel-janitors

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 18 Oct 2018 11:02:39 +0300

> The struct type was copied from the line before but it should be "tx"
> instead of "rx".  I have reviewed the code and I can't immediately see
> that this bug causes a runtime issue.
> 
> Fixes: 36e53349b60b ("bnxt_en: Add additional extended port statistics.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> This is from static analysis and I don't have a way to test it.

Applied.

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

end of thread, other threads:[~2018-10-19  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-18  8:02 [PATCH net-next] bnxt_en: Copy and paste bug in extended tx_stats Dan Carpenter
2018-10-18 14:32 ` Michael Chan
2018-10-18 22:59 ` David Miller

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