Commit 4ba9b9d0 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

Slab API: remove useless ctor parameter and reorder parameters



Slab constructors currently have a flags parameter that is never used.  And
the order of the arguments is opposite to other slab functions.  The object
pointer is placed before the kmem_cache pointer.

Convert

        ctor(void *object, struct kmem_cache *s, unsigned long flags)

to

        ctor(struct kmem_cache *s, void *object)

throughout the kernel

[akpm@linux-foundation.org: coupla fixes]
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b811c202
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1272,7 +1272,7 @@ struct sysdev_class dma_sysclass = {


/* kmem cache implementation */
/* kmem cache implementation */


static void s3c2410_dma_cache_ctor(void *p, struct kmem_cache *c, unsigned long f)
static void s3c2410_dma_cache_ctor(struct kmem_cache *c, void *p)
{
{
	memset(p, 0, sizeof(struct s3c2410_dma_buf));
	memset(p, 0, sizeof(struct s3c2410_dma_buf));
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -286,7 +286,7 @@ static ssize_t rtas_flash_read(struct file *file, char __user *buf,
}
}


/* constructor for flash_block_cache */
/* constructor for flash_block_cache */
void rtas_block_ctor(void *ptr, struct kmem_cache *cache, unsigned long flags)
void rtas_block_ctor(struct kmem_cache *cache, void *ptr)
{
{
	memset(ptr, 0, RTAS_BLK_SIZE);
	memset(ptr, 0, RTAS_BLK_SIZE);
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -526,7 +526,7 @@ repeat:
	return err;
	return err;
}
}


static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
static void zero_ctor(struct kmem_cache *cache, void *addr)
{
{
	memset(addr, 0, kmem_cache_size(cache));
	memset(addr, 0, kmem_cache_size(cache));
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -142,7 +142,7 @@ static int __init setup_kcore(void)
module_init(setup_kcore);
module_init(setup_kcore);
#endif
#endif


static void zero_ctor(void *addr, struct kmem_cache *cache, unsigned long flags)
static void zero_ctor(struct kmem_cache *cache, void *addr)
{
{
	memset(addr, 0, kmem_cache_size(cache));
	memset(addr, 0, kmem_cache_size(cache));
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@ spufs_destroy_inode(struct inode *inode)
}
}


static void
static void
spufs_init_once(void *p, struct kmem_cache * cachep, unsigned long flags)
spufs_init_once(struct kmem_cache *cachep, void *p)
{
{
	struct spufs_inode_info *ei = p;
	struct spufs_inode_info *ei = p;


Loading