OSDN Git Service

kmemleak: remove redundant code
authorLi Zefan <lizefan@huawei.com>
Thu, 3 Apr 2014 21:46:28 +0000 (14:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:20:50 +0000 (16:20 -0700)
Remove kmemleak_padding() and kmemleak_release().

Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kmemleak.h
mm/kmemleak.c

index 2a5e554..5bb4246 100644 (file)
@@ -30,8 +30,6 @@ extern void kmemleak_alloc_percpu(const void __percpu *ptr, size_t size) __ref;
 extern void kmemleak_free(const void *ptr) __ref;
 extern void kmemleak_free_part(const void *ptr, size_t size) __ref;
 extern void kmemleak_free_percpu(const void __percpu *ptr) __ref;
-extern void kmemleak_padding(const void *ptr, unsigned long offset,
-                            size_t size) __ref;
 extern void kmemleak_not_leak(const void *ptr) __ref;
 extern void kmemleak_ignore(const void *ptr) __ref;
 extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref;
index 06cd220..6f90d00 100644 (file)
@@ -1549,11 +1549,6 @@ static int kmemleak_open(struct inode *inode, struct file *file)
        return seq_open(file, &kmemleak_seq_ops);
 }
 
-static int kmemleak_release(struct inode *inode, struct file *file)
-{
-       return seq_release(inode, file);
-}
-
 static int dump_str_object_info(const char *str)
 {
        unsigned long flags;
@@ -1691,7 +1686,7 @@ static const struct file_operations kmemleak_fops = {
        .read           = seq_read,
        .write          = kmemleak_write,
        .llseek         = seq_lseek,
-       .release        = kmemleak_release,
+       .release        = seq_release,
 };
 
 static void __kmemleak_do_cleanup(void)