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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux