From: Alexey Khoroshilov
Date: Sat, 22 Apr 2017 16:06:05 +0300
> + free_idx = (free_idx + NR_TX_DESC - 1) % NR_TX_DESC;
This is more simply stated as "(free_idx - 1) % NR_TX_DESC.
Alexey Khoroshilov :
[...]
> diff --git a/drivers/net/ethernet/natsemi/ns83820.c
> b/drivers/net/ethernet/natsemi/ns83820.c
> index 729095db3e08..dfc64e1e31f9 100644
> --- a/drivers/net/ethernet/natsemi/ns83820.c
> +++ b/drivers/net/ethernet/natsemi/ns83820.c
[...]
> @@ -1183,6 +1193,32 @@ static
The driver does not check if mapping dma memory succeed.
The patch adds the checks and failure handling.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov
---
drivers/net/ethernet/natsemi/ns83820.c | 42 +++---
1 file ch