diff options
author | Nick Wilson <njw@osdl.org> | 2005-06-25 17:59:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:25:02 -0400 |
commit | 8c0e33c133021ee241e9d51255b9fb18eb34ef0e (patch) | |
tree | 30ddff7f7cf375c36d11d49352365a42b25e1def /kernel | |
parent | f45494480f31342125870c1a184999d7c5a59471 (diff) |
[PATCH] Use ALIGN to remove duplicate code
This patch makes use of ALIGN() to remove duplicate round-up code.
Signed-off-by: Nick Wilson <njw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 52f696f11adf..26967e042201 100644 --- a/kernel/resource.c +++ b/kernel/resource.c | |||
@@ -263,7 +263,7 @@ static int find_resource(struct resource *root, struct resource *new, | |||
263 | new->start = min; | 263 | new->start = min; |
264 | if (new->end > max) | 264 | if (new->end > max) |
265 | new->end = max; | 265 | new->end = max; |
266 | new->start = (new->start + align - 1) & ~(align - 1); | 266 | new->start = ALIGN(new->start, align); |
267 | if (alignf) | 267 | if (alignf) |
268 | alignf(alignf_data, new, size, align); | 268 | alignf(alignf_data, new, size, align); |
269 | if (new->start < new->end && new->end - new->start >= size - 1) { | 269 | if (new->start < new->end && new->end - new->start >= size - 1) { |