linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Bill Wendling <morbo@google.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-scsi@vger.kernel.org, clang-built-linux@googlegroups.com,
	Nick Desaulniers <ndesaulniers@google.com>,
	Ariel Elior <aelior@marvell.com>,
	Sudarsana Kalluru <skalluru@marvell.com>,
	GR-everest-linux-l2@marvell.com,
	"David S . Miller" <davem@davemloft.net>,
	Nilesh Javali <njavali@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset'
Date: Mon, 26 Jul 2021 13:36:33 -0700	[thread overview]
Message-ID: <d86ec071-00bf-e379-bdc6-c68da44ec5b7@kernel.org> (raw)
In-Reply-To: <20210726201924.3202278-3-morbo@google.com>

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 */
> 

  reply	other threads:[~2021-07-26 20:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14  9:17 [PATCH 0/3] Fix clang -Wunused-but-set-variable warnings Bill Wendling
2021-07-14  9:17 ` [PATCH 1/3] base: remove unused variable 'no_warn' Bill Wendling
2021-07-14 12:15   ` kernel test robot
2021-07-14  9:17 ` [PATCH 2/3] bnx2x: remove unused variable 'cur_data_offset' Bill Wendling
2021-07-14  9:17 ` [PATCH 3/3] scsi: qla2xxx: remove unused variable 'status' Bill Wendling
2021-07-26 20:19 ` [PATCH v2 0/3] Fix clang -Wunused-but-set-variable warnings Bill Wendling
2021-07-26 20:19   ` [PATCH v2 1/3] base: mark 'no_warn' as unused Bill Wendling
2021-07-26 20:47     ` Nathan Chancellor
2021-07-26 21:01       ` Bill Wendling
2021-07-27  5:27       ` Greg Kroah-Hartman
2021-07-27  6:15         ` Bill Wendling
2021-07-27  6:41           ` Greg Kroah-Hartman
2021-07-27  7:08             ` Bill Wendling
2021-07-27  7:12               ` Greg Kroah-Hartman
2021-07-27  7:15                 ` Bill Wendling
2021-07-27 17:39             ` Nick Desaulniers
2021-07-27 17:42               ` Nick Desaulniers
2021-07-27 17:59               ` Greg Kroah-Hartman
2021-07-27 18:31                 ` Nick Desaulniers
2021-07-27 18:44                   ` Greg Kroah-Hartman
2021-07-27 19:02                     ` Nick Desaulniers
2021-07-27 19:23                 ` Bill Wendling
2021-07-27 20:13                 ` Segher Boessenkool
2021-07-27 20:22                   ` Bill Wendling
2021-07-27 20:24                     ` Bill Wendling
2021-07-27 18:32               ` Nathan Chancellor
2021-07-27 19:04                 ` Nick Desaulniers
2021-07-27 19:10                   ` Nathan Chancellor
2021-07-27 19:12                 ` 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 message]
2021-07-26 20:19   ` [PATCH v2 3/3] scsi: qla2xxx: remove unused variable 'status' Bill Wendling
2021-07-26 20:40     ` Nathan Chancellor
2021-07-27  3:14     ` Martin K. Petersen
2021-07-29  3:38   ` [PATCH v2 0/3] Fix clang -Wunused-but-set-variable warnings Martin K. Petersen
2021-08-02 11:48 [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset' Prabhakar Kushwaha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d86ec071-00bf-e379-bdc6-c68da44ec5b7@kernel.org \
    --to=nathan@kernel.org \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=GR-everest-linux-l2@marvell.com \
    --cc=aelior@marvell.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=davem@davemloft.net \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=morbo@google.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=njavali@marvell.com \
    --cc=skalluru@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).