]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
sched-rt: avoid to shadow the variable "svc" in rt_dom_cntl
authorJulien Grall <julien.grall@citrix.com>
Thu, 29 Oct 2015 11:24:13 +0000 (12:24 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 29 Oct 2015 11:24:13 +0000 (12:24 +0100)
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 <julien.grall@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/sched_rt.c

index 6a341b11f0b5ef5587caa9991d9955f4df9ba52c..822f23c07c744f5e55ddaf868cbf25d14c7a8070 100644 (file)
@@ -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);
         }