diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-12-29 21:41:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-29 21:41:09 -0800 |
| commit | 8b0cc2d4e2705dc8793bd7c0e0f7b3504c49ecc6 (patch) | |
| tree | 5822801fb636344e18dbc5403c45e4798f339af9 | |
| parent | f2780cec2e732fb53234a9db00508fd746e317f4 (diff) | |
[PATCH] promote the ALIGN() macro
ALIGN() currently has global scope in <linux/cache.h>. This causes a
compilation error in the defxx driver.
Move ALIGN() to <linux/kernel.h> and change the defxx driver to use the
generic macro in place of its own.
| -rw-r--r-- | drivers/net/defxx.h | 7 | ||||
| -rw-r--r-- | include/linux/cache.h | 3 | ||||
| -rw-r--r-- | include/linux/kernel.h | 1 |
3 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/defxx.h b/drivers/net/defxx.h index dc88192bcd48..4fc9425dcbc8 100644 --- a/drivers/net/defxx.h +++ b/drivers/net/defxx.h @@ -1669,13 +1669,6 @@ typedef union #define XMT_BUFF_K_SA 7 /* six byte source address */ #define XMT_BUFF_K_DATA 13 /* offset to start of packet data */ -/* - * Macro evaluates to "value" aligned to "size" bytes. Make sure that - * "size" is greater than 0 bytes. - */ - -#define ALIGN(value,size) ((value + (size - 1)) & ~(size - 1)) - /* Macro for checking a "value" is within a specific range */ #define IN_RANGE(value,low,high) ((value >= low) && (value <= high)) diff --git a/include/linux/cache.h b/include/linux/cache.h index 95faa6ec3aa7..3db3832f35cb 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -1,11 +1,10 @@ #ifndef __LINUX_CACHE_H #define __LINUX_CACHE_H +#include <linux/kernel.h> #include <linux/config.h> #include <asm/cache.h> -#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) - #ifndef L1_CACHE_ALIGN #define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) #endif diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f3cadd9416ad..9cb6277f5b86 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -28,6 +28,7 @@ #define STACK_MAGIC 0xdeadbeef #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) #define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ |
