From: Parvi Kaustubhi <pkaus...@cisco.com>
Date: Thu, 26 Oct 2017 09:30:04 -0700

> Since we are allowing rx ring size modification, reset fetch index
> everytime. Otherwise it could have a stale value that can lead to a null
> pointer dereference.
> 
> Signed-off-by: Govindarajulu Varadarajan <gvara...@cisco.com>
> Signed-off-by: Parvi Kaustubhi <pkaus...@cisco.com>
> ---
>  drivers/net/ethernet/cisco/enic/vnic_rq.c | 14 ++------------
>  1 file changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cisco/enic/vnic_rq.c 
> b/drivers/net/ethernet/cisco/enic/vnic_rq.c
> index 36bc2c7..90537d9 100644
> --- a/drivers/net/ethernet/cisco/enic/vnic_rq.c
> +++ b/drivers/net/ethernet/cisco/enic/vnic_rq.c
> @@ -141,18 +141,8 @@ void vnic_rq_init(struct vnic_rq *rq, unsigned int 
> cq_index,
>  {
>       u32 fetch_index = 0;
>  

Please look at the build when you make changes:

drivers/net/ethernet/cisco/enic/vnic_rq.c: In function ‘vnic_rq_init’:
drivers/net/ethernet/cisco/enic/vnic_rq.c:142:6: warning: unused variable 
‘fetch_index’ [-Wunused-variable]

Thank you.

Reply via email to