Fwd: Re: [linux-next-20120706] x86/mm: incompatible pointer typewarning.

From: Alex Shi
Date: Fri Jul 06 2012 - 10:10:46 EST


Forward to LKML

-------- Original Message --------
Subject: Re: [linux-next-20120706] x86/mm: incompatible pointer type
warning.
Date: Fri, 06 Jul 2012 22:08:12 +0800
From: Alex Shi <alex.shi@xxxxxxxxx>
To: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
CC: yongjie.ren@xxxxxxxxx, hpa@xxxxxxxxx, "Wu, Fengguang"
<fengguang.wu@xxxxxxxxx>

On 07/06/2012 08:13 PM, Tetsuo Handa wrote:

> Hello.
>
> Commit 611ae8e3 "x86/tlb: enable tlb flush range support for x86" causes
> below warning on allnoconfig.
>
> mm/memory.c: In function 'tlb_flush_mmu':
> mm/memory.c:231: warning: passing argument 1 of 'flush_tlb_mm_range' from incompatible pointer type
> /usr/src/linux-next/arch/x86/include/asm/tlbflush.h:108: note: expected 'struct vm_area_struct *' but argument is of type 'struct mm_struct *'
> mm/memory.c:231: warning: passing argument 1 of 'flush_tlb_mm_range' from incompatible pointer type
> /usr/src/linux-next/arch/x86/include/asm/tlbflush.h:108: note: expected 'struct vm_area_struct *' but argument is of type 'struct mm_struct *'
>
> Did tlb->mm in tlb_flush() mean tlb->mm->mmap or tlb->mm->mmap_cache?



Thanks for your report, mm should means mm_struct. no vma. My fault.
Could you like try this patch.

Fengguang, I remember you build system also collect the warning message
before. Do you stop this? :)

---