All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>,
	Dario Faggioli <raistlin@linux.it>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID
Date: Mon, 4 Jun 2012 15:11:23 +0200	[thread overview]
Message-ID: <4FCCB3FB.5080504@amd.com> (raw)
In-Reply-To: <1337954436.22311.37.camel@zakaz.uk.xensource.com>

On 05/25/12 16:00, Ian Campbell wrote:

> On Fri, 2012-05-25 at 14:10 +0100, Dario Faggioli wrote:
>> On Fri, 2012-05-25 at 12:03 +0100, Ian Jackson wrote:
>>> Ian Campbell writes ("Re: [PATCH v4] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID"):
>>>> so having arranged to call that function at the right time we can assume
>>>> that type is a sensible value, and indeed setdefault makes this the
>>>> case.
>>>
>>> Right.
>>>
>> Ok.
>>
>>> The other situation where we can get _INVALID is if libxl__domain_type
>>> fails, which it can do.
>>>
>>> I think this should be handled by having places which call
>>> libxl__domain_type abandon operation and return an error if the
>>> libxl__domain_type fails.
>>>
>>> If this is done, then general variables, parameters, etc. within libxl
>>> which are supposed to contain a libxl_domain_type will never contain
>>> _INVALID.
>>>
>> I like this. I'll chase each call to that function and have the calle
>> failing if a DOMAIN_TYPE_INVALID is returned. Then, if I go this way,
>> can I also nuke both the 'case DOMAIN_TYPE_INVALID' _and_ the default
>> clauses from everywhere? I seem to think I could...
> 
> iff the compiler is smart enough to realise that in the type == INVALID
> case you have returned already before reaching the switch statement,
> otherwise you will need to have "case INVALID: abort()".


What is latest status of this patch? When will it go upstream?

> 
>>
>> Thanks and Regards,
>> Daio


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2012-06-04 13:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 15:37 [PATCH v4] libxl: introduce LIBXL_DOMAIN_TYPE_INVALID Dario Faggioli
2012-05-25  9:44 ` Ian Campbell
2012-05-25 10:26   ` Dario Faggioli
2012-05-25 10:36     ` Ian Campbell
2012-05-25 11:03       ` Ian Jackson
2012-05-25 13:10         ` Dario Faggioli
2012-05-25 14:00           ` Ian Campbell
2012-06-04 13:11             ` Christoph Egger [this message]
2012-06-04 14:03               ` Dario Faggioli

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=4FCCB3FB.5080504@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=raistlin@linux.it \
    --cc=roger.pau@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.