X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fcompiler.h;h=d331f3c1fe043e15889f579f6830b47f99e4fbf0;hb=336e4ca821df4954445f4c29cc6786c88df795b4;hp=fe04cc6f9bfb7181ffc365d99bd634845da62c6a;hpb=e72388a0aa23da8bc8e24a0cbe9d523c5a9ce294;p=carl9170fw.git diff --git a/include/linux/compiler.h b/include/linux/compiler.h index fe04cc6..d331f3c 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -18,12 +18,14 @@ #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 BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) @@ -76,7 +78,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