On 13.09.2019 09:01, Chao Gao wrote:
> On Thu, Sep 12, 2019 at 05:32:22PM +0200, Jan Beulich wrote:
>> On 12.09.2019 09:22, Chao Gao wrote:
>>> +static int secondary_thread_fn(void)
>>> +{
>>> +    unsigned int primary = cpumask_first(this_cpu(cpu_sibling_mask));
>>> +
>>> +    if ( !wait_for_state(LOADING_CALLIN) )
>>> +        return -EBUSY;
>>> +
>>> +    cpumask_set_cpu(smp_processor_id(), &cpu_callin_map);
>>> +
>>> +    if ( !wait_for_state(LOADING_EXIT) )
>>> +        return -EBUSY;
>>
>> This return looks to be unreachable, doesn't it?
> 
> Yes. I will use a variable to hold its return value and assert the
> return value is always true.

Or simply add ASSERT_UNREACHABLE() to the if()'s body?

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to