diff mbox series

[net] octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability()

Message ID 20240705095317.12640-1-amishin@t-argos.ru (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series [net] octeontx2-af: Fix incorrect value output on error path in rvu_check_rsrc_availability() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 835 this patch: 835
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 840 this patch: 840
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-07-05--15-00 (tests: 694)

Commit Message

Aleksandr Mishin July 5, 2024, 9:53 a.m. UTC
In rvu_check_rsrc_availability() in case of invalid SSOW req, an incorrect
data is printed to error log. 'req->sso' value is printed instead of
'req->ssow'. Looks like "copy-paste" mistake.

Fix this mistake by replacing 'req->sso' with 'req->ssow'.

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

Fixes: 746ea74241fa ("octeontx2-af: Add RVU block LF provisioning support")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
---
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Horman July 5, 2024, 11:17 a.m. UTC | #1
On Fri, Jul 05, 2024 at 12:53:17PM +0300, Aleksandr Mishin wrote:
> In rvu_check_rsrc_availability() in case of invalid SSOW req, an incorrect
> data is printed to error log. 'req->sso' value is printed instead of
> 'req->ssow'. Looks like "copy-paste" mistake.
> 
> Fix this mistake by replacing 'req->sso' with 'req->ssow'.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 746ea74241fa ("octeontx2-af: Add RVU block LF provisioning support")
> Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>

Reviewed-by: Simon Horman <horms@kernel.org>
Markus Elfring July 6, 2024, 3:28 p.m. UTC | #2
> In rvu_check_rsrc_availability() in case of invalid SSOW req, an incorrect
> data is printed to error log. 'req->sso' value is printed instead of
…

Another wording suggestion:
                                                         … request,
  wrong data were logged. …


Regards,
Markus
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
index ff78251f92d4..5f661e67ccbc 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.c
@@ -1643,7 +1643,7 @@  static int rvu_check_rsrc_availability(struct rvu *rvu,
 		if (req->ssow > block->lf.max) {
 			dev_err(&rvu->pdev->dev,
 				"Func 0x%x: Invalid SSOW req, %d > max %d\n",
-				 pcifunc, req->sso, block->lf.max);
+				 pcifunc, req->ssow, block->lf.max);
 			return -EINVAL;
 		}
 		mappedlfs = rvu_get_rsrc_mapcount(pfvf, block->addr);