X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fcompiler.h;h=d331f3c1fe043e15889f579f6830b47f99e4fbf0;hb=c5a9a5412641268233e2b45a837c302347f0cb5a;hp=ec4edf7f66dde9c378cad379c021f4d2173ba5a9;hpb=0eb34487ee8e70ecb8e4ee2ed5092b2788eb7f26;p=carl9170fw.git diff --git a/include/linux/compiler.h b/include/linux/compiler.h index ec4edf7..d331f3c 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -25,6 +25,7 @@ #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)])) @@ -77,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