From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752562AbcG2IvG (ORCPT ); Fri, 29 Jul 2016 04:51:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53470 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbcG2IvC (ORCPT ); Fri, 29 Jul 2016 04:51:02 -0400 From: Vitaly Kuznetsov To: David Vrabel Cc: , Juergen Gross , Stefano Stabellini , , Julien Grall , "Boris Ostrovsky" Subject: Re: [Xen-devel] [PATCH linux] xen: change the type of xen_vcpu_id to uint32_t References: <1469723086-22387-1-git-send-email-vkuznets@redhat.com> <579A3E4F.2050105@citrix.com> Date: Fri, 29 Jul 2016 10:50:58 +0200 In-Reply-To: <579A3E4F.2050105@citrix.com> (David Vrabel's message of "Thu, 28 Jul 2016 18:18:07 +0100") Message-ID: <87oa5gsu8d.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 29 Jul 2016 08:51:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Vrabel writes: > On 28/07/16 17:24, Vitaly Kuznetsov wrote: >> We pass xen_vcpu_id mapping information to hypercalls which require >> uint32_t type so it would be cleaner to have it as uint32_t. The >> initializer to -1 can be dropped as we always do the mapping before using >> it and we never check the 'not set' value anyway. > [...] >> --- a/include/xen/xen-ops.h >> +++ b/include/xen/xen-ops.h >> @@ -9,7 +9,7 @@ >> >> DECLARE_PER_CPU(struct vcpu_info *, xen_vcpu); >> >> -DECLARE_PER_CPU(int, xen_vcpu_id); >> +DECLARE_PER_CPU(uint32_t, xen_vcpu_id); >> static inline int xen_vcpu_nr(int cpu) > > Should the return type of this change to uint32_t as well? > Yes, missed that, will do v2. Sorry! >> { >> return per_cpu(xen_vcpu_id, cpu); >> -- Vitaly