Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=68e116a3b57d09b220fe38712bebd956b6dbbbc6 Commit: 68e116a3b57d09b220fe38712bebd956b6dbbbc6 Parent: 31a5c6e4f25704f51f9a1373f0784034306d4cf1 Author: Rolf Eike Beer <[EMAIL PROTECTED]> AuthorDate: Sun Jul 15 23:38:03 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Mon Jul 16 09:05:35 2007 -0700
MM: use DIV_ROUND_UP() in mm/memory.c Replace a hand coded version of DIV_ROUND_UP(). Signed-off-by: Rolf Eike Beer <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- mm/memory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index f64cbf9..ee29259 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2673,7 +2673,7 @@ int make_pages_present(unsigned long addr, unsigned long end) write = (vma->vm_flags & VM_WRITE) != 0; BUG_ON(addr >= end); BUG_ON(end > vma->vm_end); - len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE; + len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE; ret = get_user_pages(current, current->mm, addr, len, write, 0, NULL, NULL); if (ret < 0) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html