]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
igbvf: remove unused interrupt counter fields from struct igbvf_adapter
authorKohei Enju <enjuk@amazon.com>
Thu, 12 Jun 2025 16:13:40 +0000 (01:13 +0900)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 3 Jul 2025 16:39:04 +0000 (09:39 -0700)
Remove `int_counter0` and `int_counter1` from struct igbvf_adapter since
they are only incremented in interrupt handlers igbvf_intr_msix_rx() and
igbvf_msix_other(), but never read or used anywhere in the driver.

Note that igbvf_intr_msix_tx() does not have similar counter increments,
suggesting that these were likely overlooked during development.

Eliminate the fields and their unnecessary accesses in interrupt
handlers.

Tested-by: Kohei Enju <enjuk@amazon.com>
Signed-off-by: Kohei Enju <enjuk@amazon.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igbvf/igbvf.h
drivers/net/ethernet/intel/igbvf/netdev.c

index ca6e44245a7b8b1df9a74c68eff7bb37876ae2e4..ba9c3fee6da7acbf68b24a3c1b9ea017bc2506ce 100644 (file)
@@ -238,8 +238,6 @@ struct igbvf_adapter {
        int int_mode;
        u32 eims_enable_mask;
        u32 eims_other;
-       u32 int_counter0;
-       u32 int_counter1;
 
        u32 eeprom_wol;
        u32 wol;
index e55dd93458334e63e20866037cced728a0cb55b6..aed9162afd3808957c4b3ae22611a442031b740b 100644 (file)
@@ -855,8 +855,6 @@ static irqreturn_t igbvf_msix_other(int irq, void *data)
        struct igbvf_adapter *adapter = netdev_priv(netdev);
        struct e1000_hw *hw = &adapter->hw;
 
-       adapter->int_counter1++;
-
        hw->mac.get_link_status = 1;
        if (!test_bit(__IGBVF_DOWN, &adapter->state))
                mod_timer(&adapter->watchdog_timer, jiffies + 1);
@@ -899,8 +897,6 @@ static irqreturn_t igbvf_intr_msix_rx(int irq, void *data)
        struct net_device *netdev = data;
        struct igbvf_adapter *adapter = netdev_priv(netdev);
 
-       adapter->int_counter0++;
-
        /* Write the ITR value calculated at the end of the
         * previous interrupt.
         */