]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Cleanup duplicate control queue code
authorBruce Allan <bruce.w.allan@intel.com>
Fri, 26 Oct 2018 18:44:39 +0000 (11:44 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 20 Nov 2018 19:39:03 +0000 (11:39 -0800)
commit2aea70e48b00ad1d2db0e77f5f35d5d0db36f388
tree778feeb2923909b85313365ca53670fc880e7490
parent81efaa89c14649253c2ad1642ce3f91f892187ed
ice: Cleanup duplicate control queue code

1. Assigning the register offset and mask values contains duplicate code
   that can easily be replaced with a macro.

2. Separate functions for freeing send queue and receive queue rings are
   not needed; replace with a single function that uses a pointer to the
   struct ice_ctl_q_ring structure as a parameter instead of a pointer to
   the struct ice_ctl_q_info structure.

3. Initializing register settings for both send queue and receive queue
   contains duplicate code that can easily be replaced with a helper
   function.

4. Separate functions for freeing send queue and receive queue buffers are
   not needed; duplicate code can easily be replaced with a macro.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_controlq.c