From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D68221F1C for ; Tue, 27 Feb 2018 16:28:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 07:28:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,401,1515484800"; d="scan'208";a="23602110" Received: from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203]) by fmsmga002.fm.intel.com with ESMTP; 27 Feb 2018 07:28:42 -0800 From: Vipin Varghese To: dev@dpdk.org, harry.van.haaren@intel.com Cc: Vipin Varghese Date: Wed, 28 Feb 2018 02:40:22 +0530 Message-Id: <1519765822-133853-1-git-send-email-vipin.varghese@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] event/sw: code refractor for counter set X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 15:28:46 -0000 Counter variable 'out_pkts' had been set to 0, then updated. Current code change elimates double assignment to direct assignment. Signed-off-by: Vipin Varghese --- drivers/event/sw/sw_evdev_scheduler.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c index 9143b93..e3a41e0 100644 --- a/drivers/event/sw/sw_evdev_scheduler.c +++ b/drivers/event/sw/sw_evdev_scheduler.c @@ -532,8 +532,7 @@ sw_event_schedule(struct rte_eventdev *dev) } while (in_pkts > 4 && (int)in_pkts_this_iteration < sched_quanta); - out_pkts = 0; - out_pkts += sw_schedule_qid_to_cq(sw); + out_pkts = sw_schedule_qid_to_cq(sw); out_pkts_total += out_pkts; in_pkts_total += in_pkts_this_iteration; -- 2.7.4