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.more...@amd.com>
Signed-off-by: Ivan Malov <ivan.ma...@arknetworks.am>
Reviewed-by: Andy Moreton <andy.more...@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."

Reply via email to