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

Re: [Xen-devel] [PATCH v2 05/11] ioreq: add internal ioreq initialization support



On 03.09.2019 18:14, Roger Pau Monne wrote:
> @@ -821,6 +851,9 @@ int hvm_create_ioreq_server(struct domain *d, int 
> bufioreq_handling,
>      if ( i >= MAX_NR_IOREQ_SERVERS )
>          goto fail;
>  
> +    ASSERT((internal &&
> +            i >= MAX_NR_EXTERNAL_IOREQ_SERVERS && i < MAX_NR_IOREQ_SERVERS) 
> ||
> +           (!internal && i < MAX_NR_EXTERNAL_IOREQ_SERVERS));

Perhaps easier to read both here and in the event the assertion
would actually trigger as either

    ASSERT(internal
           ? i >= MAX_NR_EXTERNAL_IOREQ_SERVERS && i < MAX_NR_IOREQ_SERVERS
           : i < MAX_NR_EXTERNAL_IOREQ_SERVERS);

or even

    ASSERT(i < MAX_NR_EXTERNAL_IOREQ_SERVERS
           ? !internal
           : internal && i < MAX_NR_IOREQ_SERVERS);

?

Jan

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

 


Rackspace

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