Re: [PATCH 54/56] x86: Remove void casts

From: Bert Wesarg
Date: Wed Apr 08 2009 - 08:18:31 EST


On Wed, Apr 8, 2009 at 13:22, Jack Stone <jwjstone@xxxxxxxxxxx> wrote:
> Remove uneeded void casts
>
> Signed-Off-By: Jack Stone <jwjstone@xxxxxxxxxxx>
> ---
> Â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
èº{.nÇ+‰·Ÿ®‰­†+%ŠËlzwm…ébëæìr¸›zX§»®w¥Š{ayºÊÚë,j­¢f£¢·hš‹àz¹®w¥¢¸ ¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾«‘êçzZ+ƒùšŽŠÝj"ú!¶iO•æ¬z·švØ^¶m§ÿðà nÆàþY&—