[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 Fri, Sep 20, 2019 at 01:15:06PM +0200, Jan Beulich wrote: > 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); > > ? I went with the last variation of your proposed ASSERT. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |