The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes
@ 2004-11-15 14:37 Mathieu Segaud
  2004-11-15 14:45 ` Mathieu Segaud
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Segaud @ 2004-11-15 14:37 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]


Hi Andrew,
(sorry for resending, forgot to CC: linux-kernel@)

This fixes more compile warnings, wrt last changes in k[un]map* prototypes.
I did _not_ fold the compile fix you provided later when CONFIG_HIGHMEM=y,
in include/asm-i386/highmem.h.
This patch:
  - adds (char *) casts in pte_* macros in include/asm-i386/pgtable.h
    when CONFIG_HIGHMEM=y
  - casts swp_entry_t object entry to (char *) in mm/shmem.c.

Signed-off-by: Mathieu Segaud <matt@minas-morgul.org>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: kunmap-fallout-more-fixes.patch --]
[-- Type: text/x-patch, Size: 1974 bytes --]

diff -Naur linux-2.6.10-rc1-mm5/include/asm-i386/highmem.h linux-2.6.10-rc1-mm5-fixes/include/asm-i386/highmem.h
--- linux-2.6.10-rc1-mm5/include/asm-i386/highmem.h	2004-11-15 12:10:04.727560936 +0100
+++ linux-2.6.10-rc1-mm5-fixes/include/asm-i386/highmem.h	2004-11-15 12:13:00.764799208 +0100
@@ -62,7 +62,7 @@
 char *kmap_atomic(struct page *page, enum km_type type);
 void kunmap_atomic(char *kvaddr, enum km_type type);
 char *kmap_atomic_pfn(unsigned long pfn, enum km_type type);
-struct page *kmap_atomic_to_page(void *ptr);
+struct page *kmap_atomic_to_page(char *ptr);
 
 #define flush_cache_kmaps()	do { } while (0)
 
diff -Naur linux-2.6.10-rc1-mm5/include/asm-i386/pgtable.h linux-2.6.10-rc1-mm5-fixes/include/asm-i386/pgtable.h
--- linux-2.6.10-rc1-mm5/include/asm-i386/pgtable.h	2004-11-15 12:10:04.736559568 +0100
+++ linux-2.6.10-rc1-mm5-fixes/include/asm-i386/pgtable.h	2004-11-15 12:43:52.831242312 +0100
@@ -358,8 +358,8 @@
 	((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
 #define pte_offset_map_nested(dir, address) \
 	((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address))
-#define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
-#define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
+#define pte_unmap(pte) kunmap_atomic((char *)pte, KM_PTE0)
+#define pte_unmap_nested(pte) kunmap_atomic((char *)pte, KM_PTE1)
 #else
 #define pte_offset_map(dir, address) \
 	((pte_t *)page_address(pmd_page(*(dir))) + pte_index(address))
diff -Naur linux-2.6.10-rc1-mm5/mm/shmem.c linux-2.6.10-rc1-mm5-fixes/mm/shmem.c
--- linux-2.6.10-rc1-mm5/mm/shmem.c	2004-11-15 12:10:06.720258000 +0100
+++ linux-2.6.10-rc1-mm5-fixes/mm/shmem.c	2004-11-15 12:44:19.963117640 +0100
@@ -327,7 +327,7 @@
 	entry->val = value;
 	info->swapped += incdec;
 	if ((unsigned long)(entry - info->i_direct) >= SHMEM_NR_DIRECT)
-		kmap_atomic_to_page(entry)->nr_swapped += incdec;
+		kmap_atomic_to_page((char *)entry)->nr_swapped += incdec;
 }
 
 /*

[-- Attachment #3: Type: text/plain, Size: 132 bytes --]


-- 
Catastrophic failure of the IDE cable???.
What are you doing to the poor thing, jumping on it?

	- Beau Kuiper on linux-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes
  2004-11-15 14:37 [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes Mathieu Segaud
@ 2004-11-15 14:45 ` Mathieu Segaud
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Segaud @ 2004-11-15 14:45 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Mathieu Segaud <matt@minas-morgul.org> disait dernièrement que :

> Hi Andrew,
> (sorry for resending, forgot to CC: linux-kernel@)
>
> This fixes more compile warnings, wrt last changes in k[un]map* prototypes.
> I did _not_ fold the compile fix you provided later when CONFIG_HIGHMEM=y,
> in include/asm-i386/highmem.h.

hum sorry, the compile fix in include/asm-i386/highmem.h is included...

> This patch:
>   - adds (char *) casts in pte_* macros in include/asm-i386/pgtable.h
>     when CONFIG_HIGHMEM=y
>   - casts swp_entry_t object entry to (char *) in mm/shmem.c.

-- 
"scanf is tough" --- programmer Barbie...

	- Alexander Viro on linux-kernel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-15 14:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15 14:37 [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes Mathieu Segaud
2004-11-15 14:45 ` Mathieu Segaud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox