X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fcompiler.h;h=9ef76ec7311f25c79d9ed54d436501fe6f12b5b4;hb=054ae41a2b3a7b0210558935f520a58d8ccea1a0;hp=f6f144449a78d8c3ff687d879f340b51bfe2dc08;hpb=63ea5c984f577172a145950580c96b5135bf1629;p=carl9170fw.git diff --git a/include/linux/compiler.h b/include/linux/compiler.h index f6f1444..9ef76ec 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -17,16 +17,13 @@ #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 __unused __attribute__((unused)) #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 BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) #define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) @@ -78,7 +75,7 @@ #define container_of(ptr, type, member) ({ \ const typeof(((type *)0)->member) * __mptr = (ptr); \ - (type *)((char *)__mptr - offsetof(type, member)); }) + (type *)(((unsigned long)__mptr - offsetof(type, member))); }) #define MAX_ERRNO 4095