[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231026021627.23284-2-mengferry@linux.alibaba.com>
Date: Thu, 26 Oct 2023 10:16:27 +0800
From: Ferry Meng <mengferry@...ux.alibaba.com>
To: linux-erofs@...ts.ozlabs.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Ferry Meng <mengferry@...ux.alibaba.com>
Subject: [PATCH 2/2] erofs: tidy up redundant includes
- Remove unused includes like <linux/parser.h> and <linux/prefetch.h>;
- Move common includes into "internal.h".
Signed-off-by: Ferry Meng <mengferry@...ux.alibaba.com>
---
fs/erofs/data.c | 2 --
fs/erofs/decompressor.c | 1 -
fs/erofs/decompressor_deflate.c | 1 -
fs/erofs/decompressor_lzma.c | 1 -
fs/erofs/internal.h | 2 ++
fs/erofs/super.c | 3 ---
6 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 0c2c99c58b5e..ceb6c248bf40 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -5,9 +5,7 @@
* Copyright (C) 2021, Alibaba Cloud
*/
#include "internal.h"
-#include <linux/prefetch.h>
#include <linux/sched/mm.h>
-#include <linux/dax.h>
#include <trace/events/erofs.h>
void erofs_unmap_metabuf(struct erofs_buf *buf)
diff --git a/fs/erofs/decompressor.c b/fs/erofs/decompressor.c
index 332ec5f74002..29d539481a2b 100644
--- a/fs/erofs/decompressor.c
+++ b/fs/erofs/decompressor.c
@@ -4,7 +4,6 @@
* https://www.huawei.com/
*/
#include "compress.h"
-#include <linux/module.h>
#include <linux/lz4.h>
#ifndef LZ4_DISTANCE_MAX /* history window size */
diff --git a/fs/erofs/decompressor_deflate.c b/fs/erofs/decompressor_deflate.c
index 19e5bdeb30b6..c15ce24d51df 100644
--- a/fs/erofs/decompressor_deflate.c
+++ b/fs/erofs/decompressor_deflate.c
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <linux/module.h>
#include <linux/zlib.h>
#include "compress.h"
diff --git a/fs/erofs/decompressor_lzma.c b/fs/erofs/decompressor_lzma.c
index dee10d22ada9..72a202740cdb 100644
--- a/fs/erofs/decompressor_lzma.c
+++ b/fs/erofs/decompressor_lzma.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/xz.h>
-#include <linux/module.h>
#include "compress.h"
struct z_erofs_lzma {
diff --git a/fs/erofs/internal.h b/fs/erofs/internal.h
index ca7d85958450..3551a5734e89 100644
--- a/fs/erofs/internal.h
+++ b/fs/erofs/internal.h
@@ -8,8 +8,10 @@
#define __EROFS_INTERNAL_H
#include <linux/fs.h>
+#include <linux/dax.h>
#include <linux/dcache.h>
#include <linux/mm.h>
+#include <linux/module.h>
#include <linux/pagemap.h>
#include <linux/bio.h>
#include <linux/magic.h>
diff --git a/fs/erofs/super.c b/fs/erofs/super.c
index 019229eb2ef6..f38ff2d63364 100644
--- a/fs/erofs/super.c
+++ b/fs/erofs/super.c
@@ -4,14 +4,11 @@
* https://www.huawei.com/
* Copyright (C) 2021, Alibaba Cloud
*/
-#include <linux/module.h>
#include <linux/statfs.h>
-#include <linux/parser.h>
#include <linux/seq_file.h>
#include <linux/crc32c.h>
#include <linux/fs_context.h>
#include <linux/fs_parser.h>
-#include <linux/dax.h>
#include <linux/exportfs.h>
#include "xattr.h"
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists