Commit 8d4cb2d7 authored by Harald Welte's avatar Harald Welte Committed by David S. Miller

include/linux/kernel.h: Define HIPQUAD correctly on little-endian.

parent eb7a418e
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/byteorder.h>
/* Optimization barrier */ /* Optimization barrier */
/* The "volatile" is due to gcc bugs */ /* The "volatile" is due to gcc bugs */
...@@ -116,11 +117,17 @@ extern const char *print_tainted(void); ...@@ -116,11 +117,17 @@ extern const char *print_tainted(void);
((unsigned char *)&addr)[2], \ ((unsigned char *)&addr)[2], \
((unsigned char *)&addr)[3] ((unsigned char *)&addr)[3]
#if defined(__LITTLE_ENDIAN)
#define HIPQUAD(addr) \ #define HIPQUAD(addr) \
((unsigned char *)&addr)[3], \ ((unsigned char *)&addr)[3], \
((unsigned char *)&addr)[2], \ ((unsigned char *)&addr)[2], \
((unsigned char *)&addr)[1], \ ((unsigned char *)&addr)[1], \
((unsigned char *)&addr)[0] ((unsigned char *)&addr)[0]
#elif defined(__BIG_ENDIAN)
#define HIPQUAD NIPQUAD
#else
#error "Please fix asm/byteorder.h"
#endif /* __LITTLE_ENDIAN */
/* /*
* min()/max() macros that also do * min()/max() macros that also do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment