Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: <intel-wired-lan@osuosl.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next 2/4] iavf: use unregister_netdev
Date: Tue, 17 Oct 2023 10:33:45 -0700	[thread overview]
Message-ID: <957a0b7a-4cbd-4333-af83-1c7750452316@intel.com> (raw)
In-Reply-To: <20231016164849.45691-3-mschmidt@redhat.com>



On 10/16/2023 9:48 AM, Michal Schmidt wrote:
> Use unregister_netdev, which takes rtnl_lock for us. We don't have to
> check the reg_state under rtnl_lock. There's nothing to race with. We
> have just cancelled the finish_config work.
> 
> Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

>  drivers/net/ethernet/intel/iavf/iavf_main.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index d2f4648a6156..6036a4582196 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -5171,10 +5171,8 @@ static void iavf_remove(struct pci_dev *pdev)
>  	cancel_delayed_work_sync(&adapter->watchdog_task);
>  	cancel_work_sync(&adapter->finish_config);
>  
> -	rtnl_lock();
>  	if (netdev->reg_state == NETREG_REGISTERED)
> -		unregister_netdevice(netdev);
> -	rtnl_unlock();
> +		unregister_netdev(netdev);

This appears to have two tabs still, and thus be over-indented, as
unregister_netdevice was indented twice due to the if statement.

I can fix this locally when applying it to Intel Wired LAN dev-queue.

However, if a v2 is needed, please fix this when sending.

Thanks,
Jake

>  
>  	if (CLIENT_ALLOWED(adapter)) {
>  		err = iavf_lan_del_device(adapter);
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

  parent reply	other threads:[~2023-10-17 17:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 16:48 [Intel-wired-lan] [PATCH iwl-next 0/4] iavf: cleanups, dead code removal Michal Schmidt
2023-10-16 16:48 ` [Intel-wired-lan] [PATCH iwl-next 1/4] iavf: rely on netdev's own registered state Michal Schmidt
2023-10-17  8:01   ` Drewek, Wojciech
2023-10-17 17:30   ` Jacob Keller
2023-10-24  9:09     ` Romanowski, Rafal
2023-10-16 16:48 ` [Intel-wired-lan] [PATCH iwl-next 2/4] iavf: use unregister_netdev Michal Schmidt
2023-10-17  8:06   ` Drewek, Wojciech
2023-10-24  9:11     ` Romanowski, Rafal
2023-10-17 17:33   ` Jacob Keller [this message]
2023-10-17 18:43     ` Jacob Keller
2023-10-16 16:48 ` [Intel-wired-lan] [PATCH iwl-next 3/4] iavf: add a common function for undoing the interrupt scheme Michal Schmidt
2023-10-17  8:58   ` Drewek, Wojciech
2023-10-17 17:35   ` Jacob Keller
2023-10-24  9:12     ` Romanowski, Rafal
2023-10-16 16:48 ` [Intel-wired-lan] [PATCH iwl-next 4/4] iavf: delete the iavf client interface Michal Schmidt
2023-10-17 17:46   ` Jacob Keller
2023-10-24  9:12     ` Romanowski, Rafal

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=957a0b7a-4cbd-4333-af83-1c7750452316@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox