From: Ian Campbell Subject: Re: [PATCH v7a 09/14] xen/arm: move and rename is_vcpu_running function to sched.h Date: Wed, 2 Jul 2014 12:19:33 +0100 Message-ID: <1404299973.5562.16.camel@kazak.uk.xensource.com> References: <1404196882-23473-1-git-send-email-vijay.kilari@gmail.com> <1404196882-23473-10-git-send-email-vijay.kilari@gmail.com> <53B285A8020000780001EDA8@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B285A8020000780001EDA8@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: keir@xen.org, vijay.kilari@gmail.com, stefano.stabellini@eu.citrix.com, Prasun.Kapoor@caviumnetworks.com, Vijaya Kumar K , julien.grall@linaro.org, tim@xen.org, george.dunlap@citrix.com, xen-devel@lists.xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-07-01 at 08:55 +0100, Jan Beulich wrote: > >>> On 01.07.14 at 08:41, wrote: > > @@ -829,6 +829,20 @@ void watchdog_domain_destroy(struct domain *d); > > #define need_iommu(d) (0) > > #endif > > > > +static inline bool_t is_vcpu_online(const struct domain *d, unsigned int vcpuid) > > I'm sorry for paying attention to this only now, but a function named > this way would ordinarily have a single const struct vcpu * parameter. > If the decoding of the (domain, vcpuid) tuple is to remain in the > function I guess it ought to be renamed to e.g. is_domain_vcpu_online() Looking at the callers it doesn't seem unreasonable to me to push the indexing of d->vcpus into them. d is used for the d->max_vcpus check -- which the callers all have already or are naturally avoiding and the check for d->vcpus == NULL, which I suspect is out of the question for the existing callers (but would need checking) > (I'd further suggest to drop the is_ prefix, but I realize others may be > of different opinion). > > Jan >