| To: | Alex Elder <aelder@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sun, 24 Jul 2011 07:35:43 -0400 |
| Cc: | Chandra Seetharaman <sekharan@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
| In-reply-to: | <1311363510.2771.103.camel@doink> |
| References: | <20110722003226.21069.58401.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110722003333.21069.32295.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1311363510.2771.103.camel@doink> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Fri, Jul 22, 2011 at 02:38:30PM -0500, Alex Elder wrote: > > - (__psint_t)count), split); > > + xfs_buf_associate_memory(bp, > > + (xfs_caddr_t)((__psint_t)&(iclog->ic_header)+ > > + (__psint_t)count), split); > > If you just cast the address appropriately you can make this > look a lot nicer: > > xfs_buf_associate_memory(bp, > (void *) &iclog->ic_header + count, split); If we have to cast anyway I'd suggest casting to char * at least, as that is standard behaviour. I'm okay with using the gcc void pointer arithmetics extension when it saves us ugliness, but in this case it doesn't really buy us anything. Btw, nice follow-on cleanups would be to kill off the xfs_caddr_t and __psint_t/__psunsigned_t types entirely. |
| Previous by Date: | Re: [PATCH 2/8] xfs: Warn if direct reclaim tries to writeback pages, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 12/12] xfs: Remove the macro XFS_BUFTARG_NAME, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR, Chandra Seetharaman |
| Next by Thread: | Re: [PATCH 08/12] xfs: Remove the macro XFS_BUF_SET_PTR, Alex Elder |
| Indexes: | [Date] [Thread] [Top] [All Lists] |