mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "Harvey Harrison" <harvey.harrison@gmail.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"LKML" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nfs: replace uses of __constant_{endian}
Date: Thu, 12 Feb 2009 14:15:06 +1100 (EST)	[thread overview]
Message-ID: <6f6ef82b3d3f7eb8445e2e40ce3b534d.squirrel@neil.brown.name> (raw)
In-Reply-To: <1234407151.5566.21.camel@brick>

On Thu, February 12, 2009 1:52 pm, Harvey Harrison wrote:
> On Thu, 2009-02-12 at 13:50 +1100, NeilBrown wrote:
>> On Thu, February 12, 2009 12:16 pm, Harvey Harrison wrote:
>> > The base versions handle constant folding now, none of these headers
>> > are exported to userspace, so the __ prefixed versions are not
>> > necessary.
>>
>> I assume you compile tested this?
>>
>> I seem to recall that the reason we did it that way was that
>> some of the error codes are used in switch statements, and
>> the value for a 'case:' really has to look like a constant, not just
>> happen to evaluate to one.
>
> Yes, this requirement was explicitly built-in.  See how the various
> __swabXX bits are done in linux/swab.h.

Cool, thanks!

NeilBrown


  reply	other threads:[~2009-02-12  3:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-12  1:16 Harvey Harrison
2009-02-12  2:50 ` NeilBrown
2009-02-12  2:52   ` Harvey Harrison
2009-02-12  3:15     ` NeilBrown [this message]
2009-02-12 22:17       ` J. Bruce Fields

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=6f6ef82b3d3f7eb8445e2e40ce3b534d.squirrel@neil.brown.name \
    --to=neilb@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

Powered by JetHome