[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH V5 03/15] evtchn: alter internal object handling scheme



>>> On 19.03.13 at 16:15, Wei Liu <wei.liu2@xxxxxxxxxx> wrote:
> @@ -137,6 +138,15 @@ static int get_free_port(struct domain *d)
>      if ( port == MAX_EVTCHNS(d) )
>          return -ENOSPC;
>  
> +    if ( unlikely(group_from_port(d, port)  == NULL ) )
> +    {
> +        grp = xzalloc_array(struct evtchn *, BUCKETS_PER_GROUP);
> +        if ( unlikely(grp == NULL) )
> +            return -ENOMEM;
> +        else

No need for the "else" here.

> +            group_from_port(d, port) = grp;
> +    }
> +
>      chn = xzalloc_array(struct evtchn, EVTCHNS_PER_BUCKET);
>      if ( unlikely(chn == NULL) )
>          return -ENOMEM;
> @@ -1191,7 +1201,7 @@ int evtchn_init(struct domain *d)
>  
>  void evtchn_destroy(struct domain *d)
>  {
> -    int i;
> +    int i, j;

If you touch places like this, converting to "unsigned int" would
be appreciated.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.