staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set
Subsystems (3)
cover staging: qlge: Fix compilation failures in qlge_dbg.c when QL_DEV_DUMP is set
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(-)
Signature · 1 line
2.26.2
PATCH 1/3 staging: qlge: Remove unnecessary parentheses around struct field
Remove unnecessary parentheses around a struct field accessor that causes a build failure when QL_DEV_DUMP is set.
--- drivers/staging/qlge/qlge_dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/qlge/qlge_dbg.c +1 -1
@@ -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) \
Signature · 1 line
2.26.2
Re: [PATCH 1/3] staging: qlge: Remove unnecessary parentheses around struct field
Quoted 4 lines · Rylan Dmello
Remove unnecessary parentheses around a struct field accessor that causes a build failure when
QL_DEV_DUMPis set.Signed-off-by Rylan Dmello <[email protected]>
Add a Fixes tag.
regards,
dan carpenter
PATCH 2/3 staging: qlge: Remove print statement for vlgrp field
In reply to Rylan DmelloRemove 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.
--- drivers/staging/qlge/qlge_dbg.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/qlge/qlge_dbg.c +0 -1
@@ -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);
Signature · 1 line
2.26.2
Re: [PATCH 2/3] staging: qlge: Remove print statement for vlgrp field
Quoted 7 lines · Rylan Dmello
Remove statement that tries to print the non-existent 'vlgrp' field in the '
ql_adapter' struct, which causes a compilation failure whenQL_DEV_DUMPis set.vlgrp seems to have been removed from
ql_adapteras a part of commit18c49b91777c("qlge: do vlan cleanup") in 2011.
Quoted 6 lines
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 <[email protected]>
regards,
dan carpenter
PATCH 3/3 staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt
In reply to Rylan DmelloRemove 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.
--- drivers/staging/qlge/qlge_dbg.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/qlge/qlge_dbg.c +0 -2
@@ -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",
Signature · 1 line
2.26.2
Re: [PATCH 3/3] staging: qlge: Remove print statements for lbq_clean_idx and lbq_free_cnt
Quoted 11 lines · Rylan Dmello
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 whenQL_DEV_DUMPis 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 <[email protected]>
regards,
dan carpenter