From: Harvey Harrison <harvey.harrison@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: David Teigland <teigland@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dlm: sparse endian annotations
Date: Thu, 17 Jul 2008 13:00:51 -0700 [thread overview]
Message-ID: <1216324852.6029.13.camel@brick> (raw)
In-Reply-To: <20080716221201.GM28946@ZenIV.linux.org.uk>
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
prev parent reply other threads:[~2008-07-17 20:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-16 20:16 [PATCH] dlm: sparse endian annotations Harvey Harrison
2008-07-16 21:38 ` Al Viro
2008-07-16 21:43 ` Harvey Harrison
2008-07-16 22:12 ` Al Viro
2008-07-17 20:00 ` Harvey Harrison [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1216324852.6029.13.camel@brick \
--to=harvey.harrison@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=teigland@redhat.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox