Re: [PATCH] dlm: sparse endian annotations

From: Harvey Harrison
Date: Thu Jul 17 2008 - 16:01:42 EST

On Wed, 2008-07-16 at 23:12 +0100, Al Viro wrote:
> On Wed, Jul 16, 2008 at 02:43:41PM -0700, Harvey Harrison wrote:
> > On Wed, 2008-07-16 at 22:38 +0100, Al Viro wrote:
> > > On Wed, Jul 16, 2008 at 01:16:07PM -0700, Harvey Harrison wrote:
> > >
> > >
> > > NAK on ones below. You are only hiding the warnings; ...s() is not making
> > > it any better.
> > >
> >
> > I'd suggest that any use of {endian}s() points to code that should be
> > looked at. But if you'd also rather have the warnings, so be it.
> Frankly, I would rather have the rest of byteswaps in dlm eliminated...

I am curious though, in the general case of taking stuff off the wire
and doing work on it in-place. Would you suggest two structs for things
like this, one in cpu-order and one with the endian annotations, then
the one place where you receive can do appropriate endian conversion
using a pointer to a wire-endian struct and the rest of the code just
uses the cpu-endian struct everywhere?

Just a general design question.

In the DLM case, these util functions are only used in 1-2 places each
so it wouldn't be too bad to fold them into the receive/send paths, but
you still need to byteswap somewhere, just curious what you are


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at