From: tip-bot for Wang YanQing <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
tglx@linutronix.de, udknight@gmail.com
Subject: [tip:x86/mm] x86/mm/gart: Drop unnecessary check
Date: Tue, 16 Apr 2013 06:50:45 -0700 [thread overview]
Message-ID: <tip-26bfc540f6f2dcbd93d0b9ed8f37830419ded7e8@git.kernel.org> (raw)
In-Reply-To: <20130416013734.GA14641@udknight>
Commit-ID: 26bfc540f6f2dcbd93d0b9ed8f37830419ded7e8
Gitweb: http://git.kernel.org/tip/26bfc540f6f2dcbd93d0b9ed8f37830419ded7e8
Author: Wang YanQing <udknight@gmail.com>
AuthorDate: Tue, 16 Apr 2013 09:37:34 +0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 16 Apr 2013 10:54:40 +0200
x86/mm/gart: Drop unnecessary check
The memblock_find_in_range() return value addr is guaranteed
to be within "addr + aper_size" and not beyond GART_MAX_ADDR.
Signed-off-by: Wang YanQing <udknight@gmail.com>
Cc: yinghai@kernel.org
Link: http://lkml.kernel.org/r/20130416013734.GA14641@udknight
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/aperture_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index d5fd66f..fd972a3 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -87,7 +87,7 @@ static u32 __init allocate_aperture(void)
*/
addr = memblock_find_in_range(GART_MIN_ADDR, GART_MAX_ADDR,
aper_size, aper_size);
- if (!addr || addr + aper_size > GART_MAX_ADDR) {
+ if (!addr) {
printk(KERN_ERR
"Cannot allocate aperture memory hole (%lx,%uK)\n",
addr, aper_size>>10);
prev parent reply other threads:[~2013-04-16 13:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-16 1:37 [PATCH] x86:aperture_64: drop not needed checking Wang YanQing
2013-04-16 13:50 ` tip-bot for Wang YanQing [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-26bfc540f6f2dcbd93d0b9ed8f37830419ded7e8@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=udknight@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox