mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
[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>
This commit is contained in:
parent
f45494480f
commit
8c0e33c133
4 changed files with 6 additions and 7 deletions
|
@ -263,7 +263,7 @@ static int find_resource(struct resource *root, struct resource *new,
|
|||
new->start = min;
|
||||
if (new->end > max)
|
||||
new->end = max;
|
||||
new->start = (new->start + align - 1) & ~(align - 1);
|
||||
new->start = ALIGN(new->start, align);
|
||||
if (alignf)
|
||||
alignf(alignf_data, new, size, align);
|
||||
if (new->start < new->end && new->end - new->start >= size - 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue