On 10/17/2023 10:33 AM, Jacob Keller wrote:
> 
> 
> 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 <[email protected]>
>> ---
> 
> Reviewed-by: Jacob Keller <[email protected]>
> 
>>  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
> 

Oh, for some reason I thought the check against reg_state was also
removed. Please ignore this comment.

Thanks,
Jake
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Reply via email to