LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 net 0/2] Misc. fixes for hns3 driver
@ 2021-04-05 17:06 Salil Mehta
  2021-04-05 17:06 ` [PATCH V2 net 1/2] net: hns3: Remove the left over redundant check & assignment Salil Mehta
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Salil Mehta @ 2021-04-05 17:06 UTC (permalink / raw)
  To: davem, kuba; +Cc: salil.mehta, netdev, linux-kernel, linuxarm, linuxarm

Fixes for the miscellaneous problems found during the review of the code.

Change Summary:
 Patch 1/2, Change V1->V2:
   [1] Fixed comments from Leon Romanovsky
       Link: https://lkml.org/lkml/2021/4/4/14
 Patch 2/2, Change V1->V2:
   None

Salil Mehta (2):
  net: hns3: Remove the left over redundant check & assignment
  net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event()

 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH V2 net 1/2] net: hns3: Remove the left over redundant check & assignment
  2021-04-05 17:06 [PATCH V2 net 0/2] Misc. fixes for hns3 driver Salil Mehta
@ 2021-04-05 17:06 ` Salil Mehta
  2021-04-05 17:06 ` [PATCH V2 net 2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event() Salil Mehta
  2021-04-05 22:10 ` [PATCH V2 net 0/2] Misc. fixes for hns3 driver patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Salil Mehta @ 2021-04-05 17:06 UTC (permalink / raw)
  To: davem, kuba; +Cc: salil.mehta, netdev, linux-kernel, linuxarm, linuxarm

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>
--
V1->V2:
[1] Fixed comments from Leon Romanovsky
    Link: https://lkml.org/lkml/2021/4/4/14
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 3 ---
 1 file changed, 3 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..58d210bbb311 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -3966,7 +3966,6 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle)
 	 *    normalcy is to reset.
 	 * 2. A new reset request from the stack due to timeout
 	 *
-	 * For the first case,error event might not have ae handle available.
 	 * check if this is a new reset request and we are not here just because
 	 * last reset attempt did not succeed and watchdog hit us again. We will
 	 * know this if last reset request did not occur very recently (watchdog
@@ -3976,8 +3975,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;
 
 	if (time_before(jiffies, (hdev->last_reset_time +
 				  HCLGE_RESET_INTERVAL))) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH V2 net 2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event()
  2021-04-05 17:06 [PATCH V2 net 0/2] Misc. fixes for hns3 driver Salil Mehta
  2021-04-05 17:06 ` [PATCH V2 net 1/2] net: hns3: Remove the left over redundant check & assignment Salil Mehta
@ 2021-04-05 17:06 ` Salil Mehta
  2021-04-05 22:10 ` [PATCH V2 net 0/2] Misc. fixes for hns3 driver patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Salil Mehta @ 2021-04-05 17:06 UTC (permalink / raw)
  To: davem, kuba; +Cc: salil.mehta, netdev, linux-kernel, linuxarm, linuxarm

Code to defer the reset(which caps the frequency of the reset) schedules the
timer and returns. Hence, following 'else-if' looks un-necessary.

Fixes: 9de0b86f6444 ("net: hns3: Prevent to request reset frequently")
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 58d210bbb311..2dd2af269b46 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -3980,7 +3980,9 @@ static void hclge_reset_event(struct pci_dev *pdev, struct hnae3_handle *handle)
 				  HCLGE_RESET_INTERVAL))) {
 		mod_timer(&hdev->reset_timer, jiffies + HCLGE_RESET_INTERVAL);
 		return;
-	} else if (hdev->default_reset_request) {
+	}
+
+	if (hdev->default_reset_request) {
 		hdev->reset_level =
 			hclge_get_reset_level(ae_dev,
 					      &hdev->default_reset_request);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 net 0/2] Misc. fixes for hns3 driver
  2021-04-05 17:06 [PATCH V2 net 0/2] Misc. fixes for hns3 driver Salil Mehta
  2021-04-05 17:06 ` [PATCH V2 net 1/2] net: hns3: Remove the left over redundant check & assignment Salil Mehta
  2021-04-05 17:06 ` [PATCH V2 net 2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event() Salil Mehta
@ 2021-04-05 22:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-05 22:10 UTC (permalink / raw)
  To: Salil Mehta; +Cc: davem, kuba, netdev, linux-kernel, linuxarm, linuxarm

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Mon, 5 Apr 2021 18:06:43 +0100 you wrote:
> Fixes for the miscellaneous problems found during the review of the code.
> 
> Change Summary:
>  Patch 1/2, Change V1->V2:
>    [1] Fixed comments from Leon Romanovsky
>        Link: https://lkml.org/lkml/2021/4/4/14
>  Patch 2/2, Change V1->V2:
>    None
> 
> [...]

Here is the summary with links:
  - [V2,net,1/2] net: hns3: Remove the left over redundant check & assignment
    https://git.kernel.org/netdev/net/c/9a6aaf61487e
  - [V2,net,2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event()
    https://git.kernel.org/netdev/net/c/0600771fa6b2

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-05 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 17:06 [PATCH V2 net 0/2] Misc. fixes for hns3 driver Salil Mehta
2021-04-05 17:06 ` [PATCH V2 net 1/2] net: hns3: Remove the left over redundant check & assignment Salil Mehta
2021-04-05 17:06 ` [PATCH V2 net 2/2] net: hns3: Remove un-necessary 'else-if' in the hclge_reset_event() Salil Mehta
2021-04-05 22:10 ` [PATCH V2 net 0/2] Misc. fixes for hns3 driver patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).