From: "Jan Beulich" Subject: Re: [PATCH 1/5] xen: add ssize_t Date: Fri, 29 Jun 2012 11:38:05 +0100 Message-ID: <4FEDA1AD020000780008CD1C@nat28.tlf.novell.com> References: <1340900786-21802-1-git-send-email-jean.guyader@citrix.com> <1340900786-21802-2-git-send-email-jean.guyader@citrix.com> <4FED7DF4020000780008CC11@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jean Guyader Cc: Jean Guyader , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 29.06.12 at 12:09, Jean Guyader wrote: > On 29 June 2012 09:05, Jan Beulich wrote: >>>>> On 28.06.12 at 18:26, Jean Guyader wrote: >> >> If this is really needed (which I doubt, looking at the two users >> and their - respectively - sole callers), then for x86 please put >> the definitions alongside the size_t ones. >> >> Until the need for the type is shown, this is a NAK from me. >> > > The ssize_t can't be replaced with a size_t because the functions that use > it can return negative number and size_t is unsigned. Did you really look at the users? One stores the ssize_t value in a uint32_t (losing the signedness), and the other stores it into an int (losing the wider size). > ssize_t could be replaced by a long long which will work for all the > case 32 and 64b. A long would do as well. Jan