From: Al Viro <viro@ZenIV.linux.org.uk>
To: David Miller <davem@davemloft.net>
Cc: dhowells@redhat.com, harvey.harrison@gmail.com,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] afs: fsclient.c sparse endian annotations of operation_ID
Date: Thu, 28 Aug 2008 03:22:30 +0100 [thread overview]
Message-ID: <20080828022230.GF28946@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20080827.041705.160546703.davem@davemloft.net>
On Wed, Aug 27, 2008 at 04:17:05AM -0700, David Miller wrote:
> From: David Howells <dhowells@redhat.com>
> Date: Wed, 27 Aug 2008 12:12:24 +0100
>
> > Harvey Harrison <harvey.harrison@gmail.com> wrote:
> >
> > > + if (call->operation_ID != __constant_htonl(FSFETCHDATA64)) {
> >
> > Doesn't htonl() resolve to this for a constant argument? Following through
> > the definitions, it certainly looks like it ought to:
>
> Yes it does.
>
> The __constant_*() interfaces should only be uses for things that
> must be evaluated at compile time (static data initializations,
> switch statement case values etc.).
It's not just "must be evaluated at compile time"; it's "must be C constant
expressions", which is much stricter. And no, in the case quoted above
__constant_ form is not needed. Just use htonl()...
prev parent reply other threads:[~2008-08-28 2:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-26 22:05 [PATCH] afs: fsclient.c sparse endian annotations of operation_ID Harvey Harrison
2008-08-27 11:12 ` David Howells
2008-08-27 11:17 ` David Miller
2008-08-28 2:22 ` Al Viro [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=20080828022230.GF28946@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.