git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34bc71f
)
net: mvpp2: Fix impossible test
author
Andrew Goodbody
<andrew.goodbody@linaro.org>
Tue, 5 Aug 2025 14:18:16 +0000
(15:18 +0100)
committer
Jerome Forissier
<jerome.forissier@linaro.org>
Mon, 18 Aug 2025 13:47:57 +0000
(15:47 +0200)
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>
drivers/net/mvpp2.c
patch
|
blob
|
history
diff --git
a/drivers/net/mvpp2.c
b/drivers/net/mvpp2.c
index
184c1f9
..
c032834
100644
(file)
--- 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;