net/ice/base: minor fixes
authorQi Zhang <qi.z.zhang@intel.com>
Mon, 23 Mar 2020 07:17:34 +0000 (15:17 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:04 +0000 (13:57 +0200)
commitceb2f4c3872cd6eb68e9ecbca2b32322e6581110
tree60de6f30519b3ea26d85f06905e6bc2d14b4f91d
parent701f7ba6192e1a728eeefbbc28bad9b20280f85b
net/ice/base: minor fixes

This is a collection of minor fixes that were found during code review.
Changes are:
- Call ice_hweight8() instead of calculating it ourselves in
  ice_bits_max_set().
- Call ice_test_and_clear_bit() over calling ice_is_bit_set() then
  ice_clear_bit() in ice_rem_vsi_rss_list().
- Remove 'chrs' variable in ice_add_prof_id_flow() as it's not being
  used for anything.
- Return result directly instead of assigning to variable then
  returning the variable in ice_rem_vsig().
- Reduce scope, and don't initialize, 'or_vsig' in
  ice_add_prof_id_flow().
- Return error immediately in ice_add_prof_id_vsig(). Since the memory
  wasn't allocated, there is no need to goto and attempt to free memory.
- Show that values 37-38 are reserved in ice_flow_avf_hdr_field as the
  other reserved values are shown.
- Fix RCT ordering
- Remove initialization of values that aren't needed
- Fix function headers to match function names
- Use offsetof instead of calculating ourselves in ice_pkg_buf_alloc()
- In ice_rem_prof(), do not set status to ICE_SUCCESS as, due to code
  flow, this will always be ICE_SUCCESS.
- Remove unnecessary semicolon in ice_prof_gen_key()
- Remove unnecessary initializations
- correct bw_alloc type in ice_sched_add_root_node

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
drivers/net/ice/base/ice_flex_pipe.c
drivers/net/ice/base/ice_flex_pipe.h
drivers/net/ice/base/ice_flow.c
drivers/net/ice/base/ice_flow.h
drivers/net/ice/base/ice_sched.c
drivers/net/ice/base/ice_switch.c