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: <e13abc99-fb35-4bc4-b110-9ddfa8cdb442@linux.dev>
Date: Mon, 1 Sep 2025 23:13:05 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Brahmajit Das <listout@...tout.xyz>, netdev@...r.kernel.org,
 intel-wired-lan@...ts.osuosl.org
Cc: anthony.l.nguyen@...el.com, przemyslaw.kitszel@...el.com,
 andrew+netdev@...n.ch, davem@...emloft.net, kuba@...nel.org
Subject: Re: [PATCH] net: intel: fm10k: Fix parameter idx set but not used

On 01/09/2025 22:31, Brahmajit Das wrote:
> Variable idx is set in the loop, but is never used resulting in dead
> code. Building with GCC 16, which enables
> -Werror=unused-but-set-parameter= by default results in build error.
> This patch removes the dead code and fixes the build error.
> 
> Signed-off-by: Brahmajit Das <listout@...tout.xyz>
> ---
>   drivers/net/ethernet/intel/fm10k/fm10k_common.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_common.c b/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> index f51a63fca513..2fcbbd5accc2 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> @@ -457,7 +457,7 @@ void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32 count)
>   {
>   	u32 i;
>   
> -	for (i = 0; i < count; i++, idx++, q++) {
> +	for (i = 0; i < count; i++, q++) {
>   		q->rx_stats_idx = 0;
>   		q->tx_stats_idx = 0;
>   	}

All callers to this function provide constant 0 as idx param. The better
solution would be to remove the parameter completely.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ