From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: Ivan Malov <ivan.malov@arknetworks.am>, dev@dpdk.org
Cc: Andy Moreton <andy.moreton@amd.com>,
Pieter Jansen Van Vuuren <pieter.jansen-van-vuuren@amd.com>,
Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Subject: Re: [PATCH 1/3] common/sfc_efx/base: fix compiler warnings in statistic code
Date: Sat, 26 Jul 2025 14:51:24 +0300 [thread overview]
Message-ID: <5d2ee34b-038c-4661-9bd6-1916fe1b0491@oktetlabs.ru> (raw)
In-Reply-To: <20250711144349.9236-2-ivan.malov@arknetworks.am>
On 7/11/25 17:43, Ivan Malov wrote:
> Fixes: f2f77453cb9f ("common/sfc_efx/base: fill in software LUT for MAC statistics")
>
> Suggested-by: Andy Moreton <andy.moreton@amd.com>
> Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
> Reviewed-by: Andy Moreton <andy.moreton@amd.com>
> ---
> drivers/common/sfc_efx/base/efx_np.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/common/sfc_efx/base/efx_np.c b/drivers/common/sfc_efx/base/efx_np.c
> index a19c986691..798fcce26c 100644
> --- a/drivers/common/sfc_efx/base/efx_np.c
> +++ b/drivers/common/sfc_efx/base/efx_np.c
> @@ -750,7 +750,7 @@ efx_np_stat_describe(
> return;
>
> found:
> - if (sw_id >= lut_nentries) {
> + if ((unsigned int)sw_id >= lut_nentries) {
Unfortunately it is not trivial to understand what's happening here
without looking at code. I bit more verbose description would be
helpful.
> /*
> * Static mapping size and the size of lookup
> * table are out-of-sync. Should never happen.
> @@ -782,7 +782,6 @@ efx_np_stats_describe(
> EFX_MCDI_DECLARE_BUF(payload,
> MC_CMD_MAC_STATISTICS_DESCRIPTOR_IN_LEN,
> MC_CMD_MAC_STATISTICS_DESCRIPTOR_OUT_LENMAX_MCDI2);
> - efx_port_t *epp = &(enp->en_port);
I guess the variable is simply unused.
> uint32_t nprocessed;
> efx_mcdi_req_t req;
> uint8_t *entries;
IMHO it would be better to group similar fixes as unused variables into
single patch which clearly explains what's happening.
The goal is to "fix unused variable warnings".
The way is to "Remove unused variables."
next prev parent reply other threads:[~2025-07-26 11:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-11 14:43 [PATCH 0/3] common/sfc_efx/base: fix compiler warnings in X4 netport API Ivan Malov
2025-07-11 14:43 ` [PATCH 1/3] common/sfc_efx/base: fix compiler warnings in statistic code Ivan Malov
2025-07-26 11:51 ` Andrew Rybchenko [this message]
2025-07-11 14:43 ` [PATCH 2/3] common/sfc_efx/base: fix compiler warnings in PHY link setup Ivan Malov
2025-07-11 14:43 ` [PATCH 3/3] common/sfc_efx/base: fix compiler warning in PHY link getter Ivan Malov
2025-07-11 14:55 ` [PATCH 0/3] common/sfc_efx/base: fix compiler warnings in X4 netport API Stephen Hemminger
2025-07-11 15:13 ` Ivan Malov
2025-07-11 16:31 ` Stephen Hemminger
2025-07-22 3:50 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5d2ee34b-038c-4661-9bd6-1916fe1b0491@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=andy.moreton@amd.com \
--cc=dev@dpdk.org \
--cc=ivan.malov@arknetworks.am \
--cc=pieter.jansen-van-vuuren@amd.com \
--cc=viacheslav.galaktionov@arknetworks.am \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).