Commit 8b0cc2d4 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent f2780cec
......@@ -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))
......
#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
......
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment