2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes
Subsystems (2)
PATCH 1/1 2.6.10-rc1-mm5: fixes more warnings wrt kunmap_atomic API changes
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.
include/asm-i386/highmem.h +1 -1
@@ -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)
include/asm-i386/pgtable.h +2 -2
@@ -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))
mm/shmem.c +1 -1
@@ -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; }/*
Signature · 5 lines
-- Catastrophic failure of the IDE cable???. What are you doing to the poor thing, jumping on it? - Beau Kuiper on linux-kernel
Mathieu Segaud <[email protected]> disait dernièrement que :
Quoted 6 lines
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, ininclude/asm-i386/highmem.h.
hum sorry, the compile fix in include/asm-i386/highmem.h is included...
Quoted 4 lines
This patch:
- adds (char *) casts in pte_* macros ininclude/asm-i386/pgtable.hwhenCONFIG_HIGHMEM=y
- castsswp_entry_tobject entry to (char *) inmm/shmem.c.
Signature · 3 lines
"scanf is tough" --- programmer Barbie... - Alexander Viro on linux-kernel