Re: [PATCH 3/3] xfs: optimise CRC updates

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

 



On Fri, Dec 02, 2016 at 05:22:45AM -0800, Christoph Hellwig wrote:
> > +xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset)
> 
> > +xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset)
> 
> What about turning the first argument into a void * for both so that
> we can avoid all the pointless casts?

I thought the C standard specifically disallowed pointer arithmetic
on void pointers because they are an incomplete type, even though
they have the same alignment/representation as a char *.

IIRC, gcc will throw errors on such code if -pedantic-errors or
-Werror-pointer-arith is specified...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux