[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <36ca99e90904080518qf81b483h6ed2bc9752ee0d1e@mail.gmail.com>
Date: Wed, 8 Apr 2009 14:18:09 +0200
From: Bert Wesarg <bert.wesarg@...glemail.com>
To: Jack Stone <jwjstone@...tmail.fm>
Cc: linux-kernel@...r.kernel.org, jeff@...zik.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 54/56] x86: Remove void casts
On Wed, Apr 8, 2009 at 13:22, Jack Stone <jwjstone@...tmail.fm> wrote:
> Remove uneeded void casts
>
> Signed-Off-By: Jack Stone <jwjstone@...tmail.fm>
> ---
> arch/x86/kernel/machine_kexec_64.c | 8 ++++----
> arch/x86/kernel/microcode_amd.c | 2 +-
> arch/x86/mm/fault.c | 2 +-
> arch/x86/mm/init_32.c | 4 ++--
> arch/x86/mm/init_64.c | 10 +++++-----
> arch/x86/mm/pageattr.c | 4 ++--
> 6 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> index a03b727..025e4ac 100644
> --- a/arch/x86/mm/fault.c
> +++ b/arch/x86/mm/fault.c
> @@ -368,7 +368,7 @@ void vmalloc_sync_all(void)
> spin_lock_irqsave(&pgd_lock, flags);
> list_for_each_entry(page, &pgd_list, lru) {
> pgd_t *pgd;
> - pgd = (pgd_t *)page_address(page) + pgd_index(address);
> + pgd = page_address(page) + pgd_index(address);
Probably wrong again because of math.
> if (pgd_none(*pgd))
> set_pgd(pgd, *pgd_ref);
> else
> diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
> index d71e1b6..55d3c7c 100644
> --- a/arch/x86/mm/pageattr.c
> +++ b/arch/x86/mm/pageattr.c
> @@ -343,7 +343,7 @@ static void __set_pmd_pte(pte_t *kpte, unsigned long address, pte_t pte)
> pud_t *pud;
> pmd_t *pmd;
>
> - pgd = (pgd_t *)page_address(page) + pgd_index(address);
> + pgd = page_address(page) + pgd_index(address);
Probably wrong again because of math.
> pud = pud_offset(pgd, address);
> pmd = pmd_offset(pud, address);
> set_pte_atomic((pte_t *)pmd, pte);
> --
Bert
Powered by blists - more mailing lists