Skip to contentSkip to conversation

slab: fix kmem_ptr_validate prototype

PATCH In review Peter Zijlstra 2 participants 3 messages Dec 14, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 slab: fix kmem_ptr_validate prototype

Some fallout of: 2e892f43ccb602e8ffad73396a1000f2040c9e0b

CC mm/slab.o
/usr/src/linux-2.6-git/mm/slab.c:3557: error: conflicting types for a??kmem_ptr_validatea?? /usr/src/linux-2.6-git/include/linux/slab.h:58: error: previous declaration of a??kmem_ptr_validatea?? was here

---
 include/linux/slab.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/slab.h +1 -1
Index: linux-2.6-git/include/linux/slab.h
===================================================================
@@ -55,7 +55,7 @@ void *kmem_cache_zalloc(struct kmem_cach
 void kmem_cache_free(struct kmem_cache *, void *);
 unsigned int kmem_cache_size(struct kmem_cache *);
 const char *kmem_cache_name(struct kmem_cache *);
-int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
+int fastcall kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr);
 
 #ifdef CONFIG_NUMA
 extern void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 6 lines · Peter Zijlstra

Some fallout of: 2e892f43ccb602e8ffad73396a1000f2040c9e0b

CC mm/slab.o /usr/src/linux-2.6-git/mm/slab.c:3557: error: conflicting
types for ÿÿkmem_ptr_validateÿÿ /usr/src/linux-2.6-git/include/linux/slab.h:58: error: previous declaration of ÿÿkmem_ptr_validateÿÿ was here

Why do we need the fastcall there? What is its role?

#2 lore raw
In reply to Peter Zijlstra

The declaration of kmem_ptr_validate in slab.h does not match the one in slab.c. Remove the fastcall attribute (this is the only use in slab.c).

mm/slab.c +1 -1
Index: linux-2.6/mm/slab.c
===================================================================
@@ -3553,7 +3553,7 @@ EXPORT_SYMBOL(kmem_cache_zalloc);
  *
  * Currently only used for dentry validation.
  */
-int fastcall kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)
+int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr)
 {
 	unsigned long addr = (unsigned long)ptr;
 	unsigned long min_addr = PAGE_OFFSET;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>