From: Julien Grall Subject: [PATCH 6/6] xen/common: sched-rt: Avoid to shadow the variable "svc" in rt_dom_cntl Date: Tue, 27 Oct 2015 15:39:19 +0000 Message-ID: <1445960359-17217-7-git-send-email-julien.grall@citrix.com> References: <1445960359-17217-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zr6Mj-0002L2-Hm for xen-devel@lists.xenproject.org; Tue, 27 Oct 2015 15:40:49 +0000 In-Reply-To: <1445960359-17217-1-git-send-email-julien.grall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Julien Grall , George Dunlap , Dario Faggioli List-Id: xen-devel@lists.xenproject.org The variable "svc" is declared twice within rt_dom_cntl. However, the top declaration could be re-used avoiding re-declaring another time the variable. Signed-off-by: Julien Grall --- Cc: Dario Faggioli Cc: George Dunlap --- xen/common/sched_rt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index 6a341b1..822f23c 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -1158,7 +1158,7 @@ rt_dom_cntl( spin_lock_irqsave(&prv->lock, flags); list_for_each( iter, &sdom->vcpu ) { - struct rt_vcpu * svc = list_entry(iter, struct rt_vcpu, sdom_elem); + svc = list_entry(iter, struct rt_vcpu, sdom_elem); svc->period = MICROSECS(op->u.rtds.period); /* transfer to nanosec */ svc->budget = MICROSECS(op->u.rtds.budget); } -- 2.1.4