提交 028d2a39 编写于 作者: C Christoph Lameter 提交者: Greg Kroah-Hartman

[PATCH] USB: remove empty destructor from drivers/usb/mon/mon_text.c

Remove destructor and call kmem_cache_create with NULL for the destructor.
Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b33488eb
...@@ -64,7 +64,6 @@ struct mon_reader_text { ...@@ -64,7 +64,6 @@ struct mon_reader_text {
}; };
static void mon_text_ctor(void *, kmem_cache_t *, unsigned long); static void mon_text_ctor(void *, kmem_cache_t *, unsigned long);
static void mon_text_dtor(void *, kmem_cache_t *, unsigned long);
/* /*
* mon_text_submit * mon_text_submit
...@@ -268,7 +267,7 @@ static int mon_text_open(struct inode *inode, struct file *file) ...@@ -268,7 +267,7 @@ static int mon_text_open(struct inode *inode, struct file *file)
(long)rp); (long)rp);
rp->e_slab = kmem_cache_create(rp->slab_name, rp->e_slab = kmem_cache_create(rp->slab_name,
sizeof(struct mon_event_text), sizeof(long), 0, sizeof(struct mon_event_text), sizeof(long), 0,
mon_text_ctor, mon_text_dtor); mon_text_ctor, NULL);
if (rp->e_slab == NULL) { if (rp->e_slab == NULL) {
rc = -ENOMEM; rc = -ENOMEM;
goto err_slab; goto err_slab;
...@@ -459,7 +458,3 @@ static void mon_text_ctor(void *mem, kmem_cache_t *slab, unsigned long sflags) ...@@ -459,7 +458,3 @@ static void mon_text_ctor(void *mem, kmem_cache_t *slab, unsigned long sflags)
memset(mem, 0xe5, sizeof(struct mon_event_text)); memset(mem, 0xe5, sizeof(struct mon_event_text));
} }
static void mon_text_dtor(void *mem, kmem_cache_t *slab, unsigned long sflags)
{
;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册