lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d86ec071-00bf-e379-bdc6-c68da44ec5b7@kernel.org>
Date:   Mon, 26 Jul 2021 13:36:33 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Bill Wendling <morbo@...gle.com>, linux-kernel@...r.kernel.org,
        netdev@...r.kernel.org, linux-scsi@...r.kernel.org,
        clang-built-linux@...glegroups.com,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Ariel Elior <aelior@...vell.com>,
        Sudarsana Kalluru <skalluru@...vell.com>,
        GR-everest-linux-l2@...vell.com,
        "David S . Miller" <davem@...emloft.net>,
        Nilesh Javali <njavali@...vell.com>,
        GR-QLogic-Storage-Upstream@...vell.com,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>
Subject: Re: [PATCH v2 2/3] bnx2x: remove unused variable 'cur_data_offset'

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@...gle.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@...nel.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 */
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ