From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH 1/5] xen/domain: Prepare data for is_{pv, hvm}_domain() as early as possible
Date: Tue, 04 Sep 2018 06:53:04 -0600 [thread overview]
Message-ID: <5B8E803002000078001E520C@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <88c1b1b8-3041-3815-4741-3a1f7a2c4edd@citrix.com>
>>> On 04.09.18 at 14:17, <andrew.cooper3@citrix.com> wrote:
> On 03/09/18 17:03, Jan Beulich wrote:
>>> --- a/xen/common/domain.c
>>> +++ b/xen/common/domain.c
>>> @@ -272,8 +272,12 @@ struct domain *domain_create(domid_t domid,
>>> if ( (d = alloc_domain_struct()) == NULL )
>>> return ERR_PTR(-ENOMEM);
>>>
>>> + /* Sort out our idea of is_system_domain(). */
>>> d->domain_id = domid;
>>>
>>> + /* Debug sanity. */
>>> + ASSERT(is_system_domain(d) ? config == NULL : config != NULL);
>> Would you mind shortening this to at least
>>
>> ASSERT(is_system_domain(d) ? !config : config);
>>
>> while you move it?
>
> Unfortunately not.
>
> domain.c: In function ‘domain_create’:
> domain.c:296:67: error: pointer/integer type mismatch in conditional
> expression [-Werror]
> ASSERT(is_system_domain(d) ? !config : config);
> ^
> cc1: all warnings being treated as errors
> /local/xen.git/xen/Rules.mk:194: recipe for target 'domain.o' failed
>
> which reminds me why I wrote it the way I did originally.
Well, okay then. I suppose
ASSERT(is_system_domain(d) ? !config : !!config);
or
ASSERT(is_system_domain(d) == !config);
aren't really acceptable to you.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-09-04 12:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-03 14:46 [PATCH 0/5] xen/domain: Cleanup to the domain_create() error paths Andrew Cooper
2018-09-03 14:46 ` [PATCH 1/5] xen/domain: Prepare data for is_{pv, hvm}_domain() as early as possible Andrew Cooper
2018-09-03 16:03 ` Jan Beulich
2018-09-04 12:17 ` Andrew Cooper
2018-09-04 12:53 ` Jan Beulich [this message]
2018-09-03 16:47 ` Wei Liu
2018-09-03 14:46 ` [PATCH 2/5] xen/domain: Break __domain_destroy() out of domain_create() and complete_domain_destroy() Andrew Cooper
2018-09-03 16:05 ` Jan Beulich
2018-09-03 16:54 ` Wei Liu
2018-09-03 16:58 ` Andrew Cooper
2018-09-03 17:01 ` Wei Liu
2018-09-03 17:05 ` Andrew Cooper
2018-09-03 17:07 ` Wei Liu
2018-09-03 14:46 ` [PATCH 3/5] xen/domain: Call lock_profile_deregister_struct() from common code Andrew Cooper
2018-09-03 16:05 ` Jan Beulich
2018-09-03 16:56 ` Wei Liu
2018-09-03 14:46 ` [PATCH 4/5] xen/domain: Fold xsm_free_security_domain() paths together Andrew Cooper
2018-09-03 16:08 ` Jan Beulich
2018-09-03 16:57 ` Wei Liu
2018-09-07 20:48 ` [Non-DoD Source] " DeGraaf, Daniel G
2018-09-03 14:47 ` [PATCH 5/5] xen/domain: Make rangeset_domain_destroy() idempotent Andrew Cooper
2018-09-03 16:09 ` Jan Beulich
2018-09-03 16:57 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B8E803002000078001E520C@prv1-mh.provo.novell.com \
--to=jbeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=julien.grall@arm.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.