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>
This commit is contained in:
committed by
Jerome Forissier
parent
34bc71f2db
commit
b24c89affd
+1
-2
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user