[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB8986925DD6DBF282C160AADBE501A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Wed, 3 Sep 2025 06:08:01 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Brahmajit Das <listout@...tout.xyz>, "vadim.fedorenko@...ux.dev"
<vadim.fedorenko@...ux.dev>
CC: "andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "davem@...emloft.net" <davem@...emloft.net>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"kuba@...nel.org" <kuba@...nel.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH v2] net: intel: fm10k: Fix parameter idx
set but not used
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf
> Of Brahmajit Das
> Sent: Tuesday, September 2, 2025 9:24 AM
> To: vadim.fedorenko@...ux.dev
> Cc: andrew+netdev@...n.ch; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; davem@...emloft.net; intel-wired-
> lan@...ts.osuosl.org; kuba@...nel.org; listout@...tout.xyz;
> netdev@...r.kernel.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>
> Subject: [Intel-wired-lan] [PATCH v2] net: intel: fm10k: Fix parameter
> idx set but not used
>
> 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 idx parameter, since all the callers of the
> fm10k_unbind_hw_stats_q as 0 as idx anyways.
>
> Suggested-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
> Signed-off-by: Brahmajit Das <listout@...tout.xyz>
> ---
> changes in v2:
> - Removed the idx parameter, since all callers of
> fm10k_unbind_hw_stats_q passes idx as 0 anyways.
> ---
> drivers/net/ethernet/intel/fm10k/fm10k_common.c | 5 ++---
> drivers/net/ethernet/intel/fm10k/fm10k_common.h | 2 +-
> drivers/net/ethernet/intel/fm10k/fm10k_pf.c | 2 +-
> drivers/net/ethernet/intel/fm10k/fm10k_vf.c | 2 +-
> 4 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> b/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> index f51a63fca513..1f919a50c765 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_common.c
> @@ -447,17 +447,16 @@ void fm10k_update_hw_stats_q(struct fm10k_hw
> *hw, struct fm10k_hw_stats_q *q,
> /**
> * fm10k_unbind_hw_stats_q - Unbind the queue counters from their
> queues
> * @q: pointer to the ring of hardware statistics queue
> - * @idx: index pointing to the start of the ring iteration
> * @count: number of queues to iterate over
> *
> * Function invalidates the index values for the queues so any
> updates that
> * may have happened are ignored and the base for the queue stats is
> reset.
> **/
The kernel-doc comment still mentions @idx.
Everything else if fine.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> -void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, u32 idx, u32
> count)
> +void fm10k_unbind_hw_stats_q(struct fm10k_hw_stats_q *q, 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;
> }
...
Powered by blists - more mailing lists