Thread (2 messages) 2 messages, 2 authors, 2026-06-25

Re: [PATCH net] mlxsw: spectrum_acl_erp: Fix const qualifier of delta_clear()

From: Petr Machata <petrm@nvidia.com>
Date: 2026-06-25 13:32:28
Also in: lkml, stable

Evgenii Burenchev [off-list ref] writes:
mlxsw_sp_acl_erp_delta_clear() takes 'const char *enc_key' but modifies
the memory it points to. This is a logical error in the function
declaration.

The only caller passes a non-const buffer (aentry->ht_key.enc_key), so
the const qualifier is misleading and unnecessary.

Remove const from the enc_key parameter to match the actual usage.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c22291f7cf45 ("mlxsw: spectrum: acl: Implement delta for ERP")
Signed-off-by: Evgenii Burenchev <redacted>
Dunno how much of a net material this is, there's no bug to be fixed,
it's a source code cleanliness improvement. But the patch is correct.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help