All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Salil Mehta <salil.mehta@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com,
	linuxarm@openeuler.org
Subject: Re: [PATCH net 1/2] net: hns3: Remove the left over redundant check & assignment
Date: Sun, 4 Apr 2021 09:25:44 +0300	[thread overview]
Message-ID: <YGlb6CgaW5r4lwaC@unreal> (raw)
In-Reply-To: <20210403013520.22108-2-salil.mehta@huawei.com>

On Sat, Apr 03, 2021 at 02:35:19AM +0100, Salil Mehta wrote:
> This removes the left over check and assignment which is no longer used
> anywhere in the function and should have been removed as part of the
> below mentioned patch.
> 
> Fixes: 012fcb52f67c ("net: hns3: activate reset timer when calling reset_event")
> Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
> ---
>  drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> index e3f81c7e0ce7..7ad0722383f5 100644
> --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
> @@ -3976,8 +3976,6 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle)
>  	 * want to make sure we throttle the reset request. Therefore, we will
>  	 * not allow it again before 3*HZ times.
>  	 */
> -	if (!handle)
> -		handle = &hdev->vport[0].nic;

The comment above should be updated too, and probably the signature of
hclge_reset_event() worth to be changed.

Thanks

>  
>  	if (time_before(jiffies, (hdev->last_reset_time +
>  				  HCLGE_RESET_INTERVAL))) {
> -- 
> 2.17.1
> 

  reply	other threads:[~2021-04-04  6:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03  1:35 [PATCH net 0/2] Misc. fixes for hns3 driver Salil Mehta
2021-04-03  1:35 ` [PATCH net 1/2] net: hns3: Remove the left over redundant check & assignment Salil Mehta
2021-04-04  6:25   ` Leon Romanovsky [this message]
2021-04-05 12:26     ` Salil Mehta
2021-04-05 12:43       ` Leon Romanovsky
2021-04-05 16:21         ` Salil Mehta
2021-04-03  1:35 ` [PATCH net 2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event() Salil Mehta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YGlb6CgaW5r4lwaC@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=linuxarm@openeuler.org \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.