[PATCH 2/2] debugfs: remove modular code

From: Masahiro Yamada
Date: Sat Nov 23 2019 - 11:37:45 EST


The compilation of the code in fs/debugfs/ is controlled by
CONFIG_DEBUG_FS, which is a bool type option. Hence it is never
compiled as a module.

Remove meaningless modular code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
---

fs/debugfs/file.c | 3 ---
fs/debugfs/inode.c | 3 ---
2 files changed, 6 deletions(-)

diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 87846aad594b..46e55037c0f9 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -9,7 +9,6 @@
* See Documentation/filesystems/ for more details.
*/

-#include <linux/module.h>
#include <linux/fs.h>
#include <linux/seq_file.h>
#include <linux/pagemap.h>
@@ -1005,7 +1004,6 @@ static int u32_array_release(struct inode *inode, struct file *file)
}

static const struct file_operations u32_array_fops = {
- .owner = THIS_MODULE,
.open = u32_array_open,
.release = u32_array_release,
.read = u32_array_read,
@@ -1149,7 +1147,6 @@ static int debugfs_devm_entry_open(struct inode *inode, struct file *f)
}

static const struct file_operations debugfs_devm_entry_ops = {
- .owner = THIS_MODULE,
.open = debugfs_devm_entry_open,
.release = single_release,
.read = seq_read,
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 7b975dbb2bb4..f3478f7caab6 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -12,7 +12,6 @@

#define pr_fmt(fmt) "debugfs: " fmt

-#include <linux/module.h>
#include <linux/fs.h>
#include <linux/mount.h>
#include <linux/pagemap.h>
@@ -270,12 +269,10 @@ static struct dentry *debug_mount(struct file_system_type *fs_type,
}

static struct file_system_type debug_fs_type = {
- .owner = THIS_MODULE,
.name = "debugfs",
.mount = debug_mount,
.kill_sb = kill_litter_super,
};
-MODULE_ALIAS_FS("debugfs");

/**
* debugfs_lookup() - look up an existing debugfs file
--
2.17.1