From: Colin King <hidden> Date: 2017-06-05 09:04:56
From: Colin Ian King <redacted>
The current comparison of entry < 0 will never be true since entry is an
unsigned integer. Make entry an int to ensure -ve error return values
from the call to jumbo_frm are correctly being caught.
Detected by CoverityScan, CID#1238760 ("Macro compares unsigned to 0")
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Julia Lawall <hidden> Date: 2017-06-05 09:20:23
On Mon, 5 Jun 2017, Colin King wrote:
From: Colin Ian King <redacted>
The current comparison of entry < 0 will never be true since entry is an
unsigned integer. Make entry an int to ensure -ve error return values
from the call to jumbo_frm are correctly being caught.
Perhaps it would be good to mention that the return value of jumbo_frm
is an int and that the subsequent computations on entry are all on small
values so there is no need for unsigned.
julia
quoted hunk
Detected by CoverityScan, CID#1238760 ("Macro compares unsigned to 0")
Signed-off-by: Colin Ian King <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: David Miller <davem@davemloft.net> Date: 2017-06-06 19:14:39
From: Colin King <redacted>
Date: Mon, 5 Jun 2017 10:04:52 +0100
From: Colin Ian King <redacted>
The current comparison of entry < 0 will never be true since entry is an
unsigned integer. Make entry an int to ensure -ve error return values
from the call to jumbo_frm are correctly being caught.
Detected by CoverityScan, CID#1238760 ("Macro compares unsigned to 0")
Signed-off-by: Colin Ian King <redacted>
I know Julia asked for more comments, but I'm going to apply this
as-is for now as it is correct.
Thanks Colin.