ia64/xen-unstable

changeset 1451:3567bb7e1227

bitkeeper revision 1.951 (40c86f1e3TG3yrPgSKcY9IkNTp1PGQ)

Fix compile warning.
author kaf24@scramble.cl.cam.ac.uk
date Thu Jun 10 14:24:30 2004 +0000 (2004-06-10)
parents 5bfc0d01717c
children 92b8e1efa784
files xen/common/sched_atropos.c
line diff
     1.1 --- a/xen/common/sched_atropos.c	Thu Jun 10 13:21:42 2004 +0000
     1.2 +++ b/xen/common/sched_atropos.c	Thu Jun 10 14:24:30 2004 +0000
     1.3 @@ -60,9 +60,9 @@ struct at_cpu_info
     1.4  };
     1.5  
     1.6  
     1.7 -#define DOM_INFO(_p) ( (struct at_dom_info *)((_p)->sched_priv) )
     1.8 -#define CPU_INF(_p)  ( (struct at_cpu_info *)((_p).sched_priv) )
     1.9 -#define WAITQ(cpu)   (&( CPU_INF(schedule_data[cpu]) )->waitq )
    1.10 +#define DOM_INFO(_p) ((struct at_dom_info *)((_p)->sched_priv))
    1.11 +#define CPU_INFO(_c) ((struct at_cpu_info *)((_c).sched_priv))
    1.12 +#define WAITQ(cpu)   (&CPU_INFO(schedule_data[cpu])->waitq)
    1.13  #define RUNQ(cpu)    (&schedule_data[cpu].runqueue)
    1.14  
    1.15  #define BESTEFFORT_QUANTUM MILLISECS(5)
    1.16 @@ -524,10 +524,11 @@ static int at_init_scheduler()
    1.17  {
    1.18      int i;
    1.19      
    1.20 -    for( i = 0; i < NR_CPUS; i++)
    1.21 +    for ( i = 0; i < NR_CPUS; i++ )
    1.22      {
    1.23 -        if( (CPU_INF(schedule_data[i]) = kmalloc(sizeof(struct at_cpu_info),
    1.24 -                                            GFP_KERNEL)) == NULL )
    1.25 +        schedule_data[i].sched_priv = kmalloc(sizeof(struct at_cpu_info),
    1.26 +                                              GFP_KERNEL);
    1.27 +        if ( schedule_data[i].sched_priv == NULL )
    1.28              return -1;
    1.29          WAITQ(i)->next = WAITQ(i);
    1.30          WAITQ(i)->prev = WAITQ(i);
    1.31 @@ -589,10 +590,11 @@ static int at_alloc_task(struct task_str
    1.32  {
    1.33      ASSERT(p != NULL);
    1.34  
    1.35 -    if( (DOM_INFO(p) = kmem_cache_alloc(dom_info_cache, GFP_KERNEL)) == NULL )
    1.36 +    p->sched_priv = kmem_cache_alloc(dom_info_cache, GFP_KERNEL);
    1.37 +    if( p->sched_priv == NULL )
    1.38          return -1;
    1.39  
    1.40 -    memset(DOM_INFO(p), 0, sizeof(struct at_dom_info));
    1.41 +    memset(p->sched_priv, 0, sizeof(struct at_dom_info));
    1.42  
    1.43      return 0;
    1.44  }