linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, linux-mm@kvack.org, Dave Hansen <haveblue@us.ibm.com>
Subject: [patch] remove weird pmd cast
Date: Thu, 07 Oct 2004 09:38:40 -0700	[thread overview]
Message-ID: <E1CFbHz-0001b8-00@kernel.beaverton.ibm.com> (raw)


I don't know what this is trying to do.  It might be some kind of
artifact from when get_pgd_slow() was removed. 

The expanded expression with __pa() ends up looking something like this:

	(unsigned long)(u64)(u32)pmd-PAGE_OFFSET

and that is just nutty because pmd is a pointer now, anyway.

Attached patch removes the casts.  

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/arch/i386/mm/pgtable.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/i386/mm/pgtable.c~A3-remove-weird-pmd-casts-i386 arch/i386/mm/pgtable.c
--- memhotplug/arch/i386/mm/pgtable.c~A3-remove-weird-pmd-casts-i386	2004-10-07 09:34:26.000000000 -0700
+++ memhotplug-dave/arch/i386/mm/pgtable.c	2004-10-07 09:34:26.000000000 -0700
@@ -233,7 +233,7 @@ pgd_t *pgd_alloc(struct mm_struct *mm)
 		pmd_t *pmd = kmem_cache_alloc(pmd_cache, GFP_KERNEL);
 		if (!pmd)
 			goto out_oom;
-		set_pgd(&pgd[i], __pgd(1 + __pa((u64)((u32)pmd))));
+		set_pgd(&pgd[i], __pgd(1 + __pa(pmd)));
 	}
 	return pgd;
 
_

                 reply	other threads:[~2004-10-07 16:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1CFbHz-0001b8-00@kernel.beaverton.ibm.com \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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