Messages in this thread Patch in this message | | | Subject | [PATCH] 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes | From | Mathieu Segaud <> | Date | Mon, 15 Nov 2004 15:37:47 +0100 |
| |
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>
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; } /* -- Catastrophic failure of the IDE cable???. What are you doing to the poor thing, jumping on it?
- Beau Kuiper on linux-kernel
| |