public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhao Jin <cronozhj@gmail.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, trivial@kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] x86: trivial: remove unnecessary get_order in free_thread_info
Date: Sat, 20 Aug 2011 21:24:57 +0800	[thread overview]
Message-ID: <4E4FB5A9.700@gmail.com> (raw)

From: Zhao Jin <cronozhj@gmail.com>

Because THREAD_SIZE is defined as PAGE_SIZE << THREAD_ORDER on x86, the 
call of get_order(THREAD_SIZE) can be replaced with THREAD_ORDER.

Signed-off-by: Zhao Jin <cronozhj@gmail.com>
---
  arch/x86/kernel/process.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index e7e3b01..b9b3b1a 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -49,7 +49,7 @@ void free_thread_xstate(struct task_struct *tsk)
  void free_thread_info(struct thread_info *ti)
  {
      free_thread_xstate(ti->task);
-    free_pages((unsigned long)ti, get_order(THREAD_SIZE));
+    free_pages((unsigned long)ti, THREAD_ORDER);
  }

  void arch_task_cache_init(void)
-- 
1.7.4.1


             reply	other threads:[~2011-08-20 13:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 13:24 Zhao Jin [this message]
2011-08-22 22:49 ` [tip:x86/cleanups] x86, mm, trivial: Rmove unnecessary get_order in free_thread_info tip-bot for Zhao Jin
2011-08-23 21:01 ` [tip:x86/cleanups] x86, mm, trivial: Remove unnecessary get_order() in free_thread_info() tip-bot for Zhao Jin

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=4E4FB5A9.700@gmail.com \
    --to=cronozhj@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=trivial@kernel.org \
    --cc=x86@kernel.org \
    /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