projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
trivial: mac80211: fix indentation
[carl9170fw.git]
/
include
/
linux
/
compiler.h
diff --git
a/include/linux/compiler.h
b/include/linux/compiler.h
index b81bf1472800404745d444e0412f2e8304884a5f..e40d8aec3c45f5ab284e03156bdcab93f31e97b5 100644
(file)
--- a/
include/linux/compiler.h
+++ b/
include/linux/compiler.h
@@
-17,18
+17,17
@@
#ifndef __SHARED_COMPILER_H
#define __SHARED_COMPILER_H
#ifndef __SHARED_COMPILER_H
#define __SHARED_COMPILER_H
-#define __noinline __attribute__((noinline))
#define __noreturn __attribute__((noreturn))
#define __inline __attribute__((always_inline))
#define __hot __attribute__((hot))
#define __cold __attribute__((cold))
#define __noreturn __attribute__((noreturn))
#define __inline __attribute__((always_inline))
#define __hot __attribute__((hot))
#define __cold __attribute__((cold))
-#define __unused __attribute__((unused))
#define __force __attribute__((force))
#define __force __attribute__((force))
-#define __section(s) __attribute__((section("." # s)))
-#define __aligned(a) __attribute__((aligned(a)))
-#define __packed __attribute__((packed))
+#define __in_section(s) __attribute__((section("." # s)))
#define __visible __attribute__((externally_visible))
#define __visible __attribute__((externally_visible))
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+
+
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
@@
-105,4
+104,11
@@
static inline long IS_ERR_OR_NULL(const void *ptr)
return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}
return !ptr || IS_ERR_VALUE((unsigned long)ptr);
}
+static inline unsigned int hweight8(unsigned int w)
+{
+ unsigned int res = w - ((w >> 1) & 0x55);
+ res = (res & 0x33) + ((res >> 2) & 0x33);
+ return (res + (res >> 4)) & 0x0F;
+}
+
#endif /* __SHARED_COMPILER_H */
#endif /* __SHARED_COMPILER_H */