From 7d0c0a3a5cec1dbda36c10cca14b5c33e3acbc11 Mon Sep 17 00:00:00 2001 From: Chinmay Agarwal Date: Wed, 27 Nov 2019 01:16:36 +0530 Subject: data-kernel: rmnet: shs: Fix Errors Reported during Static Analysis. Set the weights to be used in calculating "avg_pps", when the flow is executing on the Perf CPU's in function "rmnet_shs_wq_get_flow_avg_pps". Change-Id: Ia50db34a348c068a9b1bf3171fced858ce0a62de Signed-off-by: Chinmay Agarwal --- drivers/rmnet/shs/rmnet_shs_wq.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/rmnet/shs/rmnet_shs_wq.c') diff --git a/drivers/rmnet/shs/rmnet_shs_wq.c b/drivers/rmnet/shs/rmnet_shs_wq.c index 298058c..60653bf 100644 --- a/drivers/rmnet/shs/rmnet_shs_wq.c +++ b/drivers/rmnet/shs/rmnet_shs_wq.c @@ -455,6 +455,9 @@ static u64 rmnet_shs_wq_get_flow_avg_pps(struct rmnet_shs_wq_hstat_s *hnode) /* More weight to current value */ new_weight = rmnet_shs_wq_tuning; old_weight = 100 - rmnet_shs_wq_tuning; + } else { + old_weight = rmnet_shs_wq_tuning; + new_weight = 100 - rmnet_shs_wq_tuning; } /* computing weighted average per flow, if the flow has just started, -- cgit v1.2.3