Linux MM tree latest commits
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: mm-commits@vger.kernel.org
Cc: Joakim.Tjernlund@transmode.se
Subject: + crc32-use-__byte_order-macro-for-endian-detection.patch added to -mm tree
Date: Thu, 22 Apr 2010 14:10:23 -0700	[thread overview]
Message-ID: <201004222110.o3MLANYd011250@imap1.linux-foundation.org> (raw)


The patch titled
     crc32: use __BYTE_ORDER macro for endian detection.
has been added to the -mm tree.  Its filename is
     crc32-use-__byte_order-macro-for-endian-detection.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: crc32: use __BYTE_ORDER macro for endian detection.
From: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>

Since crc32.c contains a nifty test program that can be executed in user
space, make sure endian detection works reliably in user space too.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 lib/crc32.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN lib/crc32.c~crc32-use-__byte_order-macro-for-endian-detection lib/crc32.c
--- a/lib/crc32.c~crc32-use-__byte_order-macro-for-endian-detection
+++ a/lib/crc32.c
@@ -50,7 +50,7 @@ MODULE_LICENSE("GPL");
 static inline u32
 crc32_body(u32 crc, unsigned char const *buf, size_t len, const u32 (*tab)[256])
 {
-# ifdef __LITTLE_ENDIAN
+# if __BYTE_ORDER == __LITTLE_ENDIAN
 #  define DO_CRC(x) crc = tab[0][(crc ^ (x)) & 255] ^ (crc >> 8)
 #  define DO_CRC4 crc = tab[3][(crc) & 255] ^ \
 		tab[2][(crc >> 8) & 255] ^ \
_

Patches currently in -mm which might be from Joakim.Tjernlund@transmode.se are

linux-next.patch
endian-define-__byte_order.patch
crc32-major-optimization.patch
crc32-major-optimization-checkpatch-fixes.patch
crc32-use-__byte_order-macro-for-endian-detection.patch


                 reply	other threads:[~2010-04-22 21:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201004222110.o3MLANYd011250@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Joakim.Tjernlund@transmode.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@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