]> xenbits.xensource.com Git - xen.git/commitdiff
xen/sched: Remove unused-but-set variable
authorMichal Orzel <michal.orzel@arm.com>
Wed, 27 Apr 2022 09:49:38 +0000 (11:49 +0200)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Wed, 27 Apr 2022 22:21:48 +0000 (15:21 -0700)
Function schedule_cpu_add defines and sets a variable old_unit but
does not make use of it. Remove this variable.

Signed-off-by: Michal Orzel <michal.orzel@arm.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched/core.c

index 19ab67818106c1e935fb8eff74aba3e29f331842..8a8c25bbda471a20858ffa524d95a3c5c7eed720 100644 (file)
@@ -3104,7 +3104,7 @@ int schedule_cpu_add(unsigned int cpu, struct cpupool *c)
     {
         const cpumask_t *mask;
         unsigned int cpu_iter, idx = 0;
-        struct sched_unit *old_unit, *master_unit;
+        struct sched_unit *master_unit;
         struct sched_resource *sr_old;
 
         /*
@@ -3128,7 +3128,6 @@ int schedule_cpu_add(unsigned int cpu, struct cpupool *c)
             if ( cpu == cpu_iter )
                 continue;
 
-            old_unit = idle_vcpu[cpu_iter]->sched_unit;
             sr_old = get_sched_res(cpu_iter);
             kill_timer(&sr_old->s_timer);
             idle_vcpu[cpu_iter]->sched_unit = master_unit;