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

Re: [Xen-devel] [PATCH] xsm/evtchn: Never pretend to have successfully created a Xen event channel

>>> On 19.01.15 at 12:41, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 19/01/15 11:37, Jan Beulich wrote:
>>>>> On 19.01.15 at 11:45, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> --- a/xen/common/event_channel.c
>>> +++ b/xen/common/event_channel.c
>>> @@ -1155,21 +1155,25 @@ int alloc_unbound_xen_event_channel(
>>>      spin_lock(&d->event_lock);
>>> -    if ( (port = get_free_port(d)) < 0 )
>>> +    rc = get_free_port(d);
>>> +    if ( rc < 0 )
>>>          goto out;
>>> +    port = rc;
>> While this is kind of unrelated to the real change done in this patch,
>> I'm fine with it being here, but I wonder whether this shouldn't be
>> accompanied by a type change of "port" (to evtchn_port_t).
> There are a number of other places which could also do with similar
> typechanges for port (evtchn_from_port(), port_is_valid() etc).  I would
> suggest that any such change be a separate patch.

One can view it both ways - you actively decouple rc and port here,
so this could be a good opportunity to change that type. I know
there are many other places (in fact the file doesn't appear to be
making much - if any - use of the correct type at all), but those
could all be fixed when the respective code gets eventually touched
anyway. But of course, a single cleanup patch is also going to be


Xen-devel mailing list



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