[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1216324852.6029.13.camel@brick>
Date: Thu, 17 Jul 2008 13:00:51 -0700
From: Harvey Harrison <harvey.harrison@...il.com>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: David Teigland <teigland@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dlm: sparse endian annotations
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
suggesting.
Harvey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists