[RFC][PATCH 4/5] perf, x86: Fix up kmap_atomic type

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Tuesday, August 31, 2010 - 12:26 pm

Now that the KM_type stuff is history, clean up the compiler warning.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
 arch/x86/kernel/cpu/perf_event.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/x86/kernel/cpu/perf_event.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/perf_event.c
+++ linux-2.6/arch/x86/kernel/cpu/perf_event.c
@@ -49,7 +49,6 @@ static unsigned long
 copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
 {
 	unsigned long offset, addr = (unsigned long)from;
-	int type = in_nmi() ? KM_NMI : KM_IRQ0;
 	unsigned long size, len = 0;
 	struct page *page;
 	void *map;
@@ -63,9 +62,9 @@ copy_from_user_nmi(void *to, const void 
 		offset = addr & (PAGE_SIZE - 1);
 		size = min(PAGE_SIZE - offset, n - len);
 
-		map = kmap_atomic(page, type);
+		map = kmap_atomic(page);
 		memcpy(to, map+offset, size);
-		kunmap_atomic(map, type);
+		kunmap_atomic(map);
 		put_page(page);
 
 		len  += size;


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/5] mm, highmem: kmap_atomic rework -v2, Peter Zijlstra, (Tue Aug 31, 12:26 pm)
[RFC][PATCH 1/5] mm: strictly nested kmap_atomic, Peter Zijlstra, (Tue Aug 31, 12:26 pm)
[RFC][PATCH 3/5] mm: Remove pte_*map_nested(), Peter Zijlstra, (Tue Aug 31, 12:26 pm)
[RFC][PATCH 4/5] perf, x86: Fix up kmap_atomic type, Peter Zijlstra, (Tue Aug 31, 12:26 pm)
Re: [RFC][PATCH 1/5] mm: strictly nested kmap_atomic, David Howells, (Wed Sep 1, 2:15 am)
Re: [RFC][PATCH 5/5] mm: highmem documentation, David Howells, (Wed Sep 1, 6:26 am)
Re: [RFC][PATCH 5/5] mm: highmem documentation, Peter Zijlstra, (Wed Sep 1, 7:05 am)