public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@intel.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"hpa@zytor.com" <hpa@zytor.com>,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Subject: Fwd: Re: [linux-next-20120706] x86/mm: incompatible pointer type warning.
Date: Fri, 06 Jul 2012 22:10:49 +0800	[thread overview]
Message-ID: <4FF6F1E9.7050709@intel.com> (raw)
In-Reply-To: <4FF6F14C.3070104@intel.com>

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@intel.com>
To: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
CC: yongjie.ren@intel.com, hpa@zytor.com,  "Wu, Fengguang"
<fengguang.wu@intel.com>

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? :)

---

>From 97781231b130e7f7fced12244653ed9b9946c944 Mon Sep 17 00:00:00 2001
From: Alex Shi <alex.shi@intel.com>
Date: Fri, 6 Jul 2012 20:49:25 +0800
Subject: [PATCH] x86/tlb: fix allnoconfig building warning

The incompatible parameter of flush_tlb_mm_range cause build warning.
Fix it by correct parameter.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Alex Shi <alex.shi@intel.com>
---
 arch/x86/include/asm/tlbflush.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h
b/arch/x86/include/asm/tlbflush.h
index b5a27bd..74a4433 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -105,10 +105,10 @@ static inline void flush_tlb_range(struct
vm_area_struct *vma,
 		__flush_tlb();
 }

-static inline void flush_tlb_mm_range(struct vm_area_struct *vma,
+static inline void flush_tlb_mm_range(struct mm_struct *mm,
 	   unsigned long start, unsigned long end, unsigned long vmflag)
 {
-	if (vma->vm_mm == current->active_mm)
+	if (mm == current->active_mm)
 		__flush_tlb();
 }

-- 
1.7.5.4


       reply	other threads:[~2012-07-06 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201207062113.DBE65145.OOLVOHQFFMJFtS@I-love.SAKURA.ne.jp>
     [not found] ` <4FF6F14C.3070104@intel.com>
2012-07-06 14:10   ` Alex Shi [this message]
2012-07-07  0:43     ` Fwd: Re: [linux-next-20120706] x86/mm: incompatible pointer typewarning Tetsuo Handa
2012-07-07  3:21       ` Alex Shi
2012-07-16  5:36   ` [linux-next-20120706] x86/mm: incompatible pointer type warning Alex Shi

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=4FF6F1E9.7050709@intel.com \
    --to=alex.shi@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    /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