From: Leyi Rong Date: Wed, 19 Jun 2019 15:18:38 +0000 (+0800) Subject: net/ice/base: refactor zeroing bitmap size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dfbb0b98d46cd111aa9befe06597ace96f2a94ce;p=dpdk.git net/ice/base: refactor zeroing bitmap size A couple of places in the code use a 'sizeof(bitmap) * BITS_PER_BYTE' construction to calculate the size of the bitmap when calling ice_zero_bitmap. Instead of doing this, just use the same value as in the ice_declare_bitmap declaration. Signed-off-by: Jacob Keller Signed-off-by: Paul M Stillwell Jr Signed-off-by: Leyi Rong Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c index 0f41531464..2d80af7319 100644 --- a/drivers/net/ice/base/ice_sched.c +++ b/drivers/net/ice/base/ice_sched.c @@ -5259,8 +5259,7 @@ void ice_sched_replay_agg(struct ice_hw *hw) ICE_MAX_TRAFFIC_CLASS); enum ice_status status; - ice_zero_bitmap(replay_bitmap, - sizeof(replay_bitmap) * BITS_PER_BYTE); + ice_zero_bitmap(replay_bitmap, ICE_MAX_TRAFFIC_CLASS); ice_sched_get_ena_tc_bitmap(pi, agg_info->replay_tc_bitmap, replay_bitmap); @@ -5396,7 +5395,7 @@ ice_sched_replay_vsi_agg(struct ice_hw *hw, u16 vsi_handle) struct ice_sched_agg_info *agg_info; enum ice_status status; - ice_zero_bitmap(replay_bitmap, sizeof(replay_bitmap) * BITS_PER_BYTE); + ice_zero_bitmap(replay_bitmap, ICE_MAX_TRAFFIC_CLASS); if (!ice_is_vsi_valid(hw, vsi_handle)) return ICE_ERR_PARAM; agg_info = ice_get_vsi_agg_info(hw, vsi_handle);