mbox series

[iwl-next,0/3] ice: cleanup Tx/Rx context functions

Message ID 20240227001456.3858886-1-jacob.e.keller@intel.com
Headers show
Series ice: cleanup Tx/Rx context functions | expand

Message

Jacob Keller Feb. 27, 2024, 12:14 a.m. UTC
The ice driver has a handful of functions used for packing Tx and Rx context
data from the structured software layout to the bit-packed hardware layout.

The function names are uninformative, being named "ice_write_<size>". While
they are static to the file, it is still not a good idea to use such broad
names for specific functions.

In addition, the implementation of the functions use BIT() to generate
bitmasks, while the kernel provides a more robust GENMASK() for this
purpose.

This series cleans up these functions in preparation for the live migration
driver series that will extend the functions and add inverse operations for
unpacking the hardware data format into the software structure.

Jacob Keller (3):
  ice: rename ice_write_* functions to ice_pack_ctx_*
  ice: use GENMASK instead of BIT(n) - 1 in pack functions
  ice: cleanup line splitting for context set functions

 drivers/net/ethernet/intel/ice/ice_common.c | 112 +++++++-------------
 drivers/net/ethernet/intel/ice/ice_common.h |  10 +-
 2 files changed, 45 insertions(+), 77 deletions(-)


base-commit: c47bd2f22b2f457920138cacd3a53a403fa5cf92