From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E281DCA1007 for ; Mon, 1 Sep 2025 22:13:21 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8D2A740B1A; Mon, 1 Sep 2025 22:13:21 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id C-IVEbeTHAPM; Mon, 1 Sep 2025 22:13:21 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0DC2940B1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1756764801; bh=iAn/M/2ucy/8Lh/WFBw3kIMvkZg2yrA5U3RNBpGf4FE=; h=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=daxj/S01yawUxJi3EXhcaHM23WNNYlf/S0NjRE8XbU2RgOIjxG2S2/3M90VCNUGdJ 2RaeFZ/bWKfnUK3quAjBrrBYKocARX06N72bbkwUTOhrscbY6jJ5eoSNgPDLTmpKt5 RgTVKtKgK3JUazXX8x9G/syxvD3EZGePNEgYvA/8i850cZffAvYtK6WvtgpmrHPYai UfC4FlQIELq3+4hnlH7APRBQykw8/XSRpVHJtQXkzK8CbXbgEIn40Tc87QdjQWpkBi iHZzEftOsAR/pe9twbV2/tvxcZ/kOZGNPeZI8E5flMiM85jN76ssUzraNMP1Kjfi8s k77vieLS4qiUg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 0DC2940B1B; Mon, 1 Sep 2025 22:13:21 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id A972CD2 for ; Mon, 1 Sep 2025 22:13:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8E53840B1A for ; Mon, 1 Sep 2025 22:13:19 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9Qllaxp-IUFG for ; Mon, 1 Sep 2025 22:13:19 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=95.215.58.188; helo=out-188.mta1.migadu.com; envelope-from=vadim.fedorenko@linux.dev; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 9069740B1B DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9069740B1B Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.188]) by smtp4.osuosl.org (Postfix) with ESMTPS id 9069740B1B for ; Mon, 1 Sep 2025 22:13:18 +0000 (UTC) Message-ID: Date: Mon, 1 Sep 2025 23:13:05 +0100 MIME-Version: 1.0 To: Brahmajit Das , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Cc: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org References: <20250901213100.3799820-1-listout@listout.xyz> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20250901213100.3799820-1-listout@listout.xyz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1756764795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iAn/M/2ucy/8Lh/WFBw3kIMvkZg2yrA5U3RNBpGf4FE=; b=WnjL1/ItZhqaTB0PEP7mrbcPFRjcmo8EezPjX3VC2Al1+490dkK6EQvoxQ+wI2vE757tT4 7UM94bu4scxY7QSY67gKOvY+/6aYw3CU4bdfYGrC14n+ROCg5zjRWcLcZx6fKXyPcDPT6s fDeIJOfphiHa4PHwGjTjxgVFgRGLtkg= X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WnjL1/It Subject: Re: [Intel-wired-lan] [PATCH] net: intel: fm10k: Fix parameter idx set but not used X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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 > --- > 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 384EE32F75D for ; Mon, 1 Sep 2025 22:13:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756764800; cv=none; b=dDyBbcWs1dy7MohM/GPkK+H0ZkU/b4Snz9uVBRQb/k0Il/DtsmPXAyFFMwE8yd2kDdn4SFcYw/+2ynWIqXiCqq4QQA1EQ4BHSE5UnnDYjJzc2/t2c85oWdRYck8sdDf1I1c937UZnSq6Nxkia8Q0cwstF41z4dwAoh9tiE48Uow= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756764800; c=relaxed/simple; bh=2hJIeGvPrPBdRhm9e18Vazro8L3JBlo6cfYnIHqp1QA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N0UvFIWpYxYFFdz/cVbsFnu7zmtzUzdksXcnmlKPbpEhGh1Gk7ZvL/TcN0lEJSRXJBK+3kAu+7fOKOYfjffBA9eOufINq+ZqgSBeIsH9cgPueOSg8rVPxeaI1jrMbaz/xJ8+LEiib8yvGJheQlXvc4mRMluxt6qzB5ivlzhqHyU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=WnjL1/It; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="WnjL1/It" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1756764795; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iAn/M/2ucy/8Lh/WFBw3kIMvkZg2yrA5U3RNBpGf4FE=; b=WnjL1/ItZhqaTB0PEP7mrbcPFRjcmo8EezPjX3VC2Al1+490dkK6EQvoxQ+wI2vE757tT4 7UM94bu4scxY7QSY67gKOvY+/6aYw3CU4bdfYGrC14n+ROCg5zjRWcLcZx6fKXyPcDPT6s fDeIJOfphiHa4PHwGjTjxgVFgRGLtkg= Date: Mon, 1 Sep 2025 23:13:05 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] net: intel: fm10k: Fix parameter idx set but not used To: Brahmajit Das , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Cc: anthony.l.nguyen@intel.com, przemyslaw.kitszel@intel.com, andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org References: <20250901213100.3799820-1-listout@listout.xyz> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: <20250901213100.3799820-1-listout@listout.xyz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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 > --- > 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.