summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2025-08-05 15:18:16 +0100
committerJerome Forissier <jerome.forissier@linaro.org>2025-08-18 15:47:57 +0200
commitb24c89affd9063c3f9f3ca99db075bd3bb1fc4b2 (patch)
tree0c9aac75680355252ab29a60d4aa9008ba0b9b23
parent34bc71f2db6bcd83b718ac9c28c39bd7d788a356 (diff)
net: mvpp2: Fix impossible test
You cannot test an unsigned char to be >= 256. Instead make the variables start and end to be ints. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
-rw-r--r--drivers/net/mvpp2.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 184c1f9a46a..c0328345973 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -1722,8 +1722,7 @@ static struct mvpp2_prs_entry *mvpp2_prs_flow_find(struct mvpp2 *priv, int flow)
}
/* Return first free tcam index, seeking from start to end */
-static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, unsigned char start,
- unsigned char end)
+static int mvpp2_prs_tcam_first_free(struct mvpp2 *priv, int start, int end)
{
int tid;