lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH 54/56] x86: Remove void casts
    From
    On Wed, Apr 8, 2009 at 13:22, Jack Stone <jwjstone@fastmail.fm> wrote:
    > Remove uneeded void casts
    >
    > Signed-Off-By: Jack Stone <jwjstone@fastmail.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
    \
     
     \ /
      Last update: 2009-04-08 14:21    [W:0.032 / U:0.916 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site