[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dyfxrfwy3qulor3sgfuuzxpx7jc4mbot4b7ci5marqlyxdusp4@uvf5fknefnfb>
Date: Wed, 3 Sep 2025 14:41:21 +0530
From: Brahmajit Das <listout@...tout.xyz>
To: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
Cc: "vadim.fedorenko@...ux.dev" <vadim.fedorenko@...ux.dev>,
"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
On 03.09.2025 06:08, Loktionov, Aleksandr wrote:
>
>
> > -----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>
>
>
Hi Aleksandr, can you please point out how I can remove the kernel-doc
comment. I thought removing the line
@idx: index pointing to the start of the ring iteration
from fm10k_common.c would do that.
I'm open to sending in a v3 with any changes required.
> > -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;
> > }
>
> ...
--
Regards,
listout
Powered by blists - more mailing lists