[Top] [All Lists]

Re: [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 25 Jul 2011 12:25:13 -0400
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Chandra Seetharaman <sekharan@xxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <1311609456.2914.24.camel@doink>
References: <20110722003226.21069.58401.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110722003333.21069.32295.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1311363510.2771.103.camel@doink> <20110724113543.GB26332@xxxxxxxxxxxxx> <1311609456.2914.24.camel@doink>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jul 25, 2011 at 10:57:36AM -0500, Alex Elder wrote:
> > Btw, nice follow-on cleanups would be to kill off the xfs_caddr_t and
> > __psint_t/__psunsigned_t types entirely.
> Yes.  What do you suggest to use for a pointer-sized
> type?  Just cast to (long) and rely on the usual arithmetic
> conversions to do the right thing?

The correct C99 type is (u)intptr_t.  In the kernel we only have
uintptr_t, with ACPI defining a local version of intptr_t.  I'd suggest
trying to stick to uintptr_t if we can, and if we really need a signed
version add intptr_t to the common headers - it can unconditionally be
typedef to long in Linux anyway.

<Prev in Thread] Current Thread [Next in Thread>