]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ixgbe: refactor: use DECLARE_BITMAP for ring state field
authorAleksandr Loktionov <aleksandr.loktionov@intel.com>
Thu, 22 Jan 2026 08:50:39 +0000 (09:50 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 3 Mar 2026 16:56:05 +0000 (08:56 -0800)
commit246c5495c69fae1ec96531d79106c946ea904312
tree07fe30ed91aabe8ee97a7069e66fe932eb8223b7
parentb09621cc0dfd7d2ae8557ee9d0d7ca6dc75145e5
ixgbe: refactor: use DECLARE_BITMAP for ring state field

Convert the ring state field from 'unsigned long' to a proper bitmap
using DECLARE_BITMAP macro, aligning with the implementation pattern
already used in the i40e driver.

This change:
- Adds __IXGBE_RING_STATE_NBITS as the bitmap size sentinel to enum
  ixgbe_ring_state_t (consistent with i40e's __I40E_RING_STATE_NBITS)
- Changes 'unsigned long state' to 'DECLARE_BITMAP(state,
  __IXGBE_RING_STATE_NBITS)' in struct ixgbe_ring
- Removes the address-of operator (&) when passing ring->state to bit
  manipulation functions, as bitmap arrays naturally decay to pointers

The change maintains functional equivalence while using the
more appropriate kernel bitmap API, consistent with other Intel Ethernet
drivers.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Marcin Szycik <marcin.szycik@linux.intel.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c