]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test
authorCorinna Vinschen <vinschen@redhat.com>
Tue, 9 Jun 2026 21:35:44 +0000 (14:35 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 13 Jun 2026 23:43:46 +0000 (16:43 -0700)
This is just a simple cleanup fix.  Commit 35a2443d0910f ("iavf: Add
waiting for response from PF in set mac") introduced a duplicate
ether_addr_equal() check, so the current code tests the new MAC twice
against the former MAC.

Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b
("iavf: fix MAC address setting for VFs when filter is rejected")

Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://patch.msgid.link/20260609213559.178657-4-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c

index 4f2defd2331b173b9ae977c62c7bdd65d1eaa964..ec234cc8bd9db0ac9405ff398799926a0474d605 100644 (file)
@@ -2550,13 +2550,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter,
        case VIRTCHNL_OP_ADD_ETH_ADDR:
                if (!v_retval)
                        iavf_mac_add_ok(adapter);
-               if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr))
-                       if (!ether_addr_equal(netdev->dev_addr,
-                                             adapter->hw.mac.addr)) {
-                               netif_addr_lock_bh(netdev);
-                               eth_hw_addr_set(netdev, adapter->hw.mac.addr);
-                               netif_addr_unlock_bh(netdev);
-                       }
+               if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) {
+                       netif_addr_lock_bh(netdev);
+                       eth_hw_addr_set(netdev, adapter->hw.mac.addr);
+                       netif_addr_unlock_bh(netdev);
+               }
                wake_up(&adapter->vc_waitqueue);
                break;
        case VIRTCHNL_OP_GET_STATS: {