From: Bill Wendling <morbo@google.com> Date: 2021-07-14 09:18:05
Fix the following build warning:
drivers/base/module.c:36:6: error: variable 'no_warn' set but not used [-Werror,-Wunused-but-set-variable]
int no_warn;
Signed-off-by: Bill Wendling <morbo@google.com>
---
drivers/base/module.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
From: Bill Wendling <morbo@google.com> Date: 2021-07-14 09:18:12
Fix the clang build warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1862:13: error: variable 'cur_data_offset' set but not used [-Werror,-Wunused-but-set-variable]
dma_addr_t cur_data_offset;
Signed-off-by: Bill Wendling <morbo@google.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 ------
1 file changed, 6 deletions(-)
@@ -1933,7 +1928,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)cur_query_entry->funcID,j,cur_query_entry->index);cur_query_entry++;-cur_data_offset+=sizeof(structper_queue_stats);stats_count++;/* all stats are coalesced to the leading queue */
From: Bill Wendling <morbo@google.com> Date: 2021-07-14 09:18:14
Fix the clang build warning:
drivers/scsi/qla2xxx/qla_nx.c:2209:6: error: variable 'status' set but not used [-Werror,-Wunused-but-set-variable]
int status = 0;
Signed-off-by: Bill Wendling <morbo@google.com>
---
drivers/scsi/qla2xxx/qla_nx.c | 2 --
1 file changed, 2 deletions(-)
From: Bill Wendling <morbo@google.com> Date: 2021-07-26 20:19:36
Fix the following build warning:
drivers/base/module.c:36:6: error: variable 'no_warn' set but not used [-Werror,-Wunused-but-set-variable]
int no_warn;
This variable is used to remove another warning, but causes a warning
itself. Mark it as 'unused' to avoid that.
Signed-off-by: Bill Wendling <morbo@google.com>
---
drivers/base/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Bill Wendling <morbo@google.com> Date: 2021-07-26 20:19:44
Fix the clang build warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1862:13: error: variable 'cur_data_offset' set but not used [-Werror,-Wunused-but-set-variable]
dma_addr_t cur_data_offset;
Signed-off-by: Bill Wendling <morbo@google.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 ------
1 file changed, 6 deletions(-)
@@ -1933,7 +1928,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)cur_query_entry->funcID,j,cur_query_entry->index);cur_query_entry++;-cur_data_offset+=sizeof(structper_queue_stats);stats_count++;/* all stats are coalesced to the leading queue */
From: Bill Wendling <morbo@google.com> Date: 2021-07-26 20:21:20
Fix the clang build warning:
drivers/scsi/qla2xxx/qla_nx.c:2209:6: error: variable 'status' set but not used [-Werror,-Wunused-but-set-variable]
int status = 0;
Signed-off-by: Bill Wendling <morbo@google.com>
---
drivers/scsi/qla2xxx/qla_nx.c | 2 --
1 file changed, 2 deletions(-)
On 7/26/2021 1:19 PM, 'Bill Wendling' via Clang Built Linux wrote:
Fix the clang build warning:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1862:13: error: variable 'cur_data_offset' set but not used [-Werror,-Wunused-but-set-variable]
dma_addr_t cur_data_offset;
Signed-off-by: Bill Wendling <morbo@google.com>
It has been unused since the function's introduction in commit
67c431a5f2f3 ("bnx2x: Support statistics collection for VFs by the PF"),
perhaps a leftover remnant from a previous version?
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
@@ -1933,7 +1928,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)cur_query_entry->funcID,j,cur_query_entry->index);cur_query_entry++;-cur_data_offset+=sizeof(structper_queue_stats);stats_count++;/* all stats are coalesced to the leading queue */
From: Martin K. Petersen <hidden> Date: 2021-07-29 03:39:28
On Mon, 26 Jul 2021 13:19:21 -0700, Bill Wendling wrote:
These patches clean up warnings from clang's '-Wunused-but-set-variable' flag.
Changes for v2:
- Mark "no_warn" as "__maybe_unused" to avoid separate warning.
Bill Wendling (3):
base: mark 'no_warn' as unused
bnx2x: remove unused variable 'cur_data_offset'
scsi: qla2xxx: remove unused variable 'status'
[...]