LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* RE: [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset'
@ 2021-08-02 11:48 Prabhakar Kushwaha
0 siblings, 0 replies; 3+ messages in thread
From: Prabhakar Kushwaha @ 2021-08-02 11:48 UTC (permalink / raw)
To: Bill Wendling, linux-kernel, netdev, linux-scsi,
clang-built-linux, Nathan Chancellor, Nick Desaulniers,
Ariel Elior, Sudarsana Reddy Kalluru, GR-everest-linux-l2,
David S . Miller, Nilesh Javali, GR-QLogic-Storage-Upstream,
James E . J . Bottomley, Martin K . Petersen, Shai Malin
> -----Original Message-----
> From: Bill Wendling <morbo@google.com>
> Sent: Tuesday, July 27, 2021 1:49 AM
> To: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; linux-
> scsi@vger.kernel.org; clang-built-linux@googlegroups.com; Nathan Chancellor
> <nathan@kernel.org>; Nick Desaulniers <ndesaulniers@google.com>; Ariel Elior
> <aelior@marvell.com>; Sudarsana Reddy Kalluru <skalluru@marvell.com>; GR-
> everest-linux-l2 <GR-everest-linux-l2@marvell.com>; David S . Miller
> <davem@davemloft.net>; Nilesh Javali <njavali@marvell.com>; GR-QLogic-
> Storage-Upstream <GR-QLogic-Storage-Upstream@marvell.com>; James E . J .
> Bottomley <jejb@linux.ibm.com>; Martin K . Petersen
> <martin.petersen@oracle.com>
> Cc: Bill Wendling <morbo@google.com>
> Subject: [EXT] [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset'
>
> 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>
> ---
Acked-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset'
2021-07-26 20:19 ` [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset' Bill Wendling
@ 2021-07-26 20:36 ` Nathan Chancellor
0 siblings, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2021-07-26 20:36 UTC (permalink / raw)
To: Bill Wendling, linux-kernel, netdev, linux-scsi,
clang-built-linux, Nick Desaulniers, Ariel Elior,
Sudarsana Kalluru, GR-everest-linux-l2, David S . Miller,
Nilesh Javali, GR-QLogic-Storage-Upstream,
James E . J . Bottomley, Martin K . Petersen
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>
> ---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> index 27943b0446c2..f255fd0b16db 100644
> --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
> @@ -1858,7 +1858,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
> {
> int i;
> int first_queue_query_index, num_queues_req;
> - dma_addr_t cur_data_offset;
> struct stats_query_entry *cur_query_entry;
> u8 stats_count = 0;
> bool is_fcoe = false;
> @@ -1879,10 +1878,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
> BNX2X_NUM_ETH_QUEUES(bp), is_fcoe, first_queue_query_index,
> first_queue_query_index + num_queues_req);
>
> - cur_data_offset = bp->fw_stats_data_mapping +
> - offsetof(struct bnx2x_fw_stats_data, queue_stats) +
> - num_queues_req * sizeof(struct per_queue_stats);
> -
> cur_query_entry = &bp->fw_stats_req->
> query[first_queue_query_index + num_queues_req];
>
> @@ -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(struct per_queue_stats);
> stats_count++;
>
> /* all stats are coalesced to the leading queue */
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset'
2021-07-26 20:19 ` [PATCH v2 " Bill Wendling
@ 2021-07-26 20:19 ` Bill Wendling
2021-07-26 20:36 ` Nathan Chancellor
0 siblings, 1 reply; 3+ messages in thread
From: Bill Wendling @ 2021-07-26 20:19 UTC (permalink / raw)
To: linux-kernel, netdev, linux-scsi, clang-built-linux,
Nathan Chancellor, Nick Desaulniers, Ariel Elior,
Sudarsana Kalluru, GR-everest-linux-l2, David S . Miller,
Nilesh Javali, GR-QLogic-Storage-Upstream,
James E . J . Bottomley, Martin K . Petersen
Cc: Bill Wendling
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(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
index 27943b0446c2..f255fd0b16db 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c
@@ -1858,7 +1858,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
{
int i;
int first_queue_query_index, num_queues_req;
- dma_addr_t cur_data_offset;
struct stats_query_entry *cur_query_entry;
u8 stats_count = 0;
bool is_fcoe = false;
@@ -1879,10 +1878,6 @@ void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
BNX2X_NUM_ETH_QUEUES(bp), is_fcoe, first_queue_query_index,
first_queue_query_index + num_queues_req);
- cur_data_offset = bp->fw_stats_data_mapping +
- offsetof(struct bnx2x_fw_stats_data, queue_stats) +
- num_queues_req * sizeof(struct per_queue_stats);
-
cur_query_entry = &bp->fw_stats_req->
query[first_queue_query_index + num_queues_req];
@@ -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(struct per_queue_stats);
stats_count++;
/* all stats are coalesced to the leading queue */
--
2.32.0.432.gabb21c7263-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-02 11:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 11:48 [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset' Prabhakar Kushwaha
-- strict thread matches above, loose matches on Subject: below --
2021-07-14 9:17 [PATCH 0/3] Fix clang -Wunused-but-set-variable warnings Bill Wendling
2021-07-26 20:19 ` [PATCH v2 " Bill Wendling
2021-07-26 20:19 ` [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset' Bill Wendling
2021-07-26 20:36 ` Nathan Chancellor
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).