diff mbox series

[5/8] xen/sched: Remove unused-but-set variable

Message ID 20220427094941.291554-6-michal.orzel@arm.com (mailing list archive)
State New, archived
Headers show
Series xen: Remove unused-but-set variables | expand

Commit Message

Michal Orzel April 27, 2022, 9:49 a.m. UTC
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>
---
 xen/common/sched/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jürgen Groß April 27, 2022, 10:06 a.m. UTC | #1
On 27.04.22 11:49, Michal Orzel wrote:
> 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>


Juergen
Dario Faggioli April 27, 2022, 8:19 p.m. UTC | #2
On Wed, 2022-04-27 at 12:06 +0200, Juergen Gross wrote:
> On 27.04.22 11:49, Michal Orzel wrote:
> > 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>

Regards
diff mbox series

Patch

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index 19ab678181..8a8c25bbda 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -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;