From: Julien Grall Date: Thu, 29 Oct 2015 11:24:13 +0000 (+0100) Subject: sched-rt: avoid to shadow the variable "svc" in rt_dom_cntl X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2331 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=79fbab823fde327c6b766529c1b06b509457dc92;p=xen.git sched-rt: avoid to shadow the variable "svc" in rt_dom_cntl 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 Reviewed-by: Andrew Cooper Acked-by: Dario Faggioli --- diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index 6a341b11f0..822f23c07c 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); }