netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set
@ 2020-04-27  4:13 Rylan Dmello
  2020-04-27  4:14 ` [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field Rylan Dmello
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rylan Dmello @ 2020-04-27  4:13 UTC (permalink / raw)
  To: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

qlge_dbg.c has a bunch of code that is conditionally compiled only
when the QL_DEV_DUMP macro is set in qlge.h (it is unset by default).

Several fields have been removed from the 'ql_adapter' and 'rx_ring'
structs in qlge.h so that qlge_dbg.c no longer compiles when
QL_DEV_DUMP is set.

This patchset updates qlge_dbg.c so that compiles successfully
when QL_DEV_DUMP is set.

Rylan Dmello (3):
  staging: qlge: Remove unnecessary parentheses around struct field
  staging: qlge: Remove print statement for vlgrp field.
  staging: qlge: Remove print statements for lbq_clean_idx and
    lbq_free_cnt

 drivers/staging/qlge/qlge_dbg.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

-- 
2.26.2


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

* [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field
  2020-04-27  4:13 [PATCH 0/3] staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set Rylan Dmello
@ 2020-04-27  4:14 ` Rylan Dmello
  2020-04-28 12:04   ` Dan Carpenter
  2020-04-27  4:14 ` [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field Rylan Dmello
  2020-04-27  4:15 ` [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt Rylan Dmello
  2 siblings, 1 reply; 7+ messages in thread
From: Rylan Dmello @ 2020-04-27  4:14 UTC (permalink / raw)
  To: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

Remove unnecessary parentheses around a struct field accessor that
causes a build failure when QL_DEV_DUMP is set.

Signed-off-by: Rylan Dmello <mail@rylan.coffee>
---
 drivers/staging/qlge/qlge_dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index 216b13d8c131..e0dcdc452e2e 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1559,7 +1559,7 @@ void ql_dump_stat(struct ql_adapter *qdev)
 #ifdef QL_DEV_DUMP
 
 #define DUMP_QDEV_FIELD(qdev, type, field)		\
-	pr_err("qdev->%-24s = " type "\n", #field, (qdev)->(field))
+	pr_err("qdev->%-24s = " type "\n", #field, (qdev)->field)
 #define DUMP_QDEV_DMA_FIELD(qdev, field)		\
 	pr_err("qdev->%-24s = %llx\n", #field, (unsigned long long)qdev->field)
 #define DUMP_QDEV_ARRAY(qdev, type, array, index, field) \
-- 
2.26.2


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

* [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field
  2020-04-27  4:13 [PATCH 0/3] staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set Rylan Dmello
  2020-04-27  4:14 ` [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field Rylan Dmello
@ 2020-04-27  4:14 ` Rylan Dmello
  2020-04-28 12:06   ` Dan Carpenter
  2020-04-27  4:15 ` [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt Rylan Dmello
  2 siblings, 1 reply; 7+ messages in thread
From: Rylan Dmello @ 2020-04-27  4:14 UTC (permalink / raw)
  To: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

Remove statement that tries to print the non-existent 'vlgrp' field
in the 'ql_adapter' struct, which causes a compilation failure when
QL_DEV_DUMP is set.

vlgrp seems to have been removed from ql_adapter as a part of
commit 18c49b91777c ("qlge: do vlan cleanup") in 2011.

vlgrp might be replaced by the 'active_vlans' array introduced in the
aforementioned commit. But I'm not sure if printing all 64 values of
that array would help with debugging this driver, so I'm leaving it
out of the debug code in this patch.

Signed-off-by: Rylan Dmello <mail@rylan.coffee>
---
 drivers/staging/qlge/qlge_dbg.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index e0dcdc452e2e..bf157baace54 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1570,7 +1570,6 @@ void ql_dump_qdev(struct ql_adapter *qdev)
 	int i;
 
 	DUMP_QDEV_FIELD(qdev, "%lx", flags);
-	DUMP_QDEV_FIELD(qdev, "%p", vlgrp);
 	DUMP_QDEV_FIELD(qdev, "%p", pdev);
 	DUMP_QDEV_FIELD(qdev, "%p", ndev);
 	DUMP_QDEV_FIELD(qdev, "%d", chip_rev_id);
-- 
2.26.2


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

* [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt
  2020-04-27  4:13 [PATCH 0/3] staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set Rylan Dmello
  2020-04-27  4:14 ` [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field Rylan Dmello
  2020-04-27  4:14 ` [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field Rylan Dmello
@ 2020-04-27  4:15 ` Rylan Dmello
  2020-04-28 12:07   ` Dan Carpenter
  2 siblings, 1 reply; 7+ messages in thread
From: Rylan Dmello @ 2020-04-27  4:15 UTC (permalink / raw)
  To: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

Remove debug print statements referring to non-existent fields
'lbq_clean_idx' and 'lbq_free_cnt' in the 'rx_ring' struct, which causes
a compilation failure when QL_DEV_DUMP is set.

These fields were initially removed as a part of commit aec626d2092f
("staging: qlge: Update buffer queue prod index despite oom") in 2019.

Their replacement fields ('next_to_use' and 'next_to_clean') are already
being printed, so this patch does not add new debug statements for them.

Signed-off-by: Rylan Dmello <mail@rylan.coffee>
---
 drivers/staging/qlge/qlge_dbg.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index bf157baace54..058889687907 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1757,8 +1757,6 @@ void ql_dump_rx_ring(struct rx_ring *rx_ring)
 	       rx_ring->lbq.prod_idx_db_reg);
 	pr_err("rx_ring->lbq.next_to_use = %d\n", rx_ring->lbq.next_to_use);
 	pr_err("rx_ring->lbq.next_to_clean = %d\n", rx_ring->lbq.next_to_clean);
-	pr_err("rx_ring->lbq_clean_idx = %d\n", rx_ring->lbq_clean_idx);
-	pr_err("rx_ring->lbq_free_cnt = %d\n", rx_ring->lbq_free_cnt);
 
 	pr_err("rx_ring->sbq.base = %p\n", rx_ring->sbq.base);
 	pr_err("rx_ring->sbq.base_dma = %llx\n",
-- 
2.26.2


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

* Re: [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field
  2020-04-27  4:14 ` [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field Rylan Dmello
@ 2020-04-28 12:04   ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2020-04-28 12:04 UTC (permalink / raw)
  To: Rylan Dmello, Kaaira Gupta
  Cc: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

On Mon, Apr 27, 2020 at 12:14:11AM -0400, Rylan Dmello wrote:
> Remove unnecessary parentheses around a struct field accessor that
> causes a build failure when QL_DEV_DUMP is set.
> 
> Signed-off-by: Rylan Dmello <mail@rylan.coffee>

Add a Fixes tag.

Fixes: 67e6cf7338e1 ("staging: qlge: add braces around macro arguments")

regards,
dan carpenter


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

* Re: [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field
  2020-04-27  4:14 ` [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field Rylan Dmello
@ 2020-04-28 12:06   ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2020-04-28 12:06 UTC (permalink / raw)
  To: Rylan Dmello
  Cc: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

On Mon, Apr 27, 2020 at 12:14:44AM -0400, Rylan Dmello wrote:
> Remove statement that tries to print the non-existent 'vlgrp' field
> in the 'ql_adapter' struct, which causes a compilation failure when
> QL_DEV_DUMP is set.
> 
> vlgrp seems to have been removed from ql_adapter as a part of
> commit 18c49b91777c ("qlge: do vlan cleanup") in 2011.
> 
> vlgrp might be replaced by the 'active_vlans' array introduced in the
> aforementioned commit. But I'm not sure if printing all 64 values of
> that array would help with debugging this driver, so I'm leaving it
> out of the debug code in this patch.
> 
> Signed-off-by: Rylan Dmello <mail@rylan.coffee>

Fixes: 18c49b91777c ("qlge: do vlan cleanup")

regards,
dan carpenter


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

* Re: [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt
  2020-04-27  4:15 ` [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt Rylan Dmello
@ 2020-04-28 12:07   ` Dan Carpenter
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Carpenter @ 2020-04-28 12:07 UTC (permalink / raw)
  To: Rylan Dmello
  Cc: Manish Chopra, GR-Linux-NIC-Dev, Greg Kroah-Hartman, netdev,
	devel, linux-kernel, Benjamin Poirier, Jiri Pirko

On Mon, Apr 27, 2020 at 12:15:18AM -0400, Rylan Dmello wrote:
> Remove debug print statements referring to non-existent fields
> 'lbq_clean_idx' and 'lbq_free_cnt' in the 'rx_ring' struct, which causes
> a compilation failure when QL_DEV_DUMP is set.
> 
> These fields were initially removed as a part of commit aec626d2092f
> ("staging: qlge: Update buffer queue prod index despite oom") in 2019.
> 
> Their replacement fields ('next_to_use' and 'next_to_clean') are already
> being printed, so this patch does not add new debug statements for them.
> 
> Signed-off-by: Rylan Dmello <mail@rylan.coffee>


Fixes: aec626d2092f ("staging: qlge: Update buffer queue prod index despite oom")

regards,
dan carpenter


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

end of thread, other threads:[~2020-04-28 12:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27  4:13 [PATCH 0/3] staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set Rylan Dmello
2020-04-27  4:14 ` [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field Rylan Dmello
2020-04-28 12:04   ` Dan Carpenter
2020-04-27  4:14 ` [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field Rylan Dmello
2020-04-28 12:06   ` Dan Carpenter
2020-04-27  4:15 ` [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt Rylan Dmello
2020-04-28 12:07   ` Dan Carpenter

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