Subject: Re: [PATCH net 4/4] net: hns: remove useless head=ring->next_to_clean

From: Andy Shevchenko <[email-masked]>
Date: Tue, 08 Mar 2016 09:18:08 +0200

On Tue, 2016-03-08 at 11:52 +0800, Lisheng wrote:
> From: Qianqian Xie <[email-masked]>
> 
> The variable head in hns_nic_tx_fini_pro has read a value,
> but the value is not used. The patch will solve it.
> 
> Signed-off-by: Qianqian Xie <[email-masked]>
> ---
>  drivers/net/ethernet/hisilicon/hns/hns_enet.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
> b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
> index 3f77ff7..7b4ec2f 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
> @@ -901,10 +901,8 @@ static int hns_nic_tx_poll_one(struct
> hns_nic_ring_data *ring_data,
>  static void hns_nic_tx_fini_pro(struct hns_nic_ring_data *ring_data)
>  {
>  	struct hnae_ring *ring = ring_data->ring;
> -	int head = ring->next_to_clean;
>  

This empty line is a leftover, I prefer to just cut assignment.

> -	/* for hardware bug fixed */

This is not good. Explanation is needed why you removed this comment.

> -	head = readl_relaxed(ring->io_base + RCB_REG_HEAD);
> +	int head = readl_relaxed(ring->io_base + RCB_REG_HEAD);
>  
>  	if (head != ring->next_to_clean) {
>  		ring_data->ring->q->handle->dev->ops-
> >toggle_ring_irq(

-- 
Andy Shevchenko <[email-masked]>
Intel Finland Oy