crypto: fcrypt - Fix bitoperation for compilation with clang
crypto: fcrypt - Fix bitoperation for compilation with clang

v2: Fix bug in statement as pointed out by Herbert Xu. Kudos to pipacs.

Author:  PaX Team <pageexec at freemail.hu>
ML-Post: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120507/142707.html
URL:     http://llvm.linuxfoundation.org

Merge:   Jan-Simon Möller <dl9pf at gmx.de>

Description:

Fix for warning:
linux/crypto/fcrypt.c:143:47: warning: signed shift result (0x598000000) requires 36 bits to
      represent, but 'int' only has 32 bits [-Wshift-overflow]
        Z(0xef), Z(0x70), Z(0xcf), Z(0xc2), Z(0x2a), Z(0xb3), Z(0x61), Z(0xad),
                                                     ^~~~~~~
linux/crypto/fcrypt.c:113:29: note: expanded from macro 'Z'
                            ^  ~~
linux/include/uapi/linux/byteorder/little_endian.h:38:53: note: expanded from macro
      '__cpu_to_be32'
                                                    ^
linux/include/uapi/linux/swab.h:116:21: note: expanded from macro '__swab32'
        ___constant_swab32(x) :                 \
                           ^
linux/include/uapi/linux/swab.h:18:12: note: expanded from macro '___constant_swab32'
        (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |            \
                  ^

Solution - make sure we don't exceed the 32 bit range.
 #define Z(x) cpu_to_be32(((x & 0x1f) << 27) | (x >> 5))

Signed-off-by: Jan-Simon Möller <36ded0fe241474e14ca49d9021f8ba3a70d78d60@gmx.de>
CC: 79082de0c93349f717971d409a005388d1854a7c@freemail.hu
CC: 48521293e058c8a928a6932c387daef2f39461d6@lists.linuxfoundation.org
CC: 9152da451d71c2a1ceb0c7b0908d4018fc127ae6@converseincode.com
CC: ef65de1c7be0aa837fe7b25ba9a7739905af6a55@gondor.apana.org.au
CC: fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net
CC: dd678b0cc126b3945a8d0574649fd7c8e4138da8@vger.kernel.org
CC: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Signed-off-by: Herbert Xu <ef65de1c7be0aa837fe7b25ba9a7739905af6a55@gondor.apana.org.au>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs