]> www.infradead.org Git - users/hch/misc.git/commitdiff
net: ena: Minor cosmetic changes
authorDavid Arinzon <darinzon@amazon.com>
Tue, 30 Jan 2024 09:53:45 +0000 (09:53 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 1 Feb 2024 12:22:12 +0000 (13:22 +0100)
A few changes for better readability and style

1. Adding / Removing newlines
2. Removing an unnecessary and confusing comment
3. Using an existing variable rather than re-checking a field

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: David Arinzon <darinzon@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/amazon/ena/ena_netdev.c

index 1c0a7828d397bd730a71af4b04894065ac51efda..d68d08147f03d31978c192f70aa272dbaf27099b 100644 (file)
@@ -2197,8 +2197,6 @@ void ena_down(struct ena_adapter *adapter)
        /* After this point the napi handler won't enable the tx queue */
        ena_napi_disable_in_range(adapter, 0, io_queue_count);
 
-       /* After destroy the queue there won't be any new interrupts */
-
        if (test_bit(ENA_FLAG_TRIGGER_RESET, &adapter->flags)) {
                int rc;
 
@@ -3226,7 +3224,7 @@ static void ena_destroy_device(struct ena_adapter *adapter, bool graceful)
        if (!graceful)
                ena_com_set_admin_running_state(ena_dev, false);
 
-       if (test_bit(ENA_FLAG_DEV_UP, &adapter->flags))
+       if (dev_up)
                ena_down(adapter);
 
        /* Stop the device from sending AENQ events (in case reset flag is set
@@ -4040,8 +4038,8 @@ static void __ena_shutoff(struct pci_dev *pdev, bool shutdown)
                free_irq_cpu_rmap(netdev->rx_cpu_rmap);
                netdev->rx_cpu_rmap = NULL;
        }
-#endif /* CONFIG_RFS_ACCEL */
 
+#endif /* CONFIG_RFS_ACCEL */
        /* Make sure timer and reset routine won't be called after
         * freeing device resources.
         */