From b19a603d624df431ccf5540c1bbf43db014a3f1b Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 29 Apr 2021 19:17:35 +0200 Subject: [PATCH] btrfs-progs: remove unnecessary linux/*.h includes Decrease dependency on system headers, remove where they're not needed or became stale after code moved. The path-utils.h encapsulate path operations so include linux/limits.h here, that's where PATH_MAX is defined. Signed-off-by: David Sterba --- cmds/filesystem.c | 1 - cmds/subvolume.c | 1 - common/device-scan.c | 1 - common/path-utils.h | 1 + common/utils.c | 3 --- convert/source-fs.h | 2 -- convert/source-reiserfs.c | 1 - kernel-lib/bitops.h | 1 - kernel-shared/zoned.c | 1 - 9 files changed, 1 insertion(+), 11 deletions(-) diff --git a/cmds/filesystem.c b/cmds/filesystem.c index a17db9b5..c03ef0e7 100644 --- a/cmds/filesystem.c +++ b/cmds/filesystem.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/cmds/subvolume.c b/cmds/subvolume.c index 6f5e688c..accdb183 100644 --- a/cmds/subvolume.c +++ b/cmds/subvolume.c @@ -27,7 +27,6 @@ #include #include #include -#include #include diff --git a/common/device-scan.c b/common/device-scan.c index 659f48c4..7ff1ef6a 100644 --- a/common/device-scan.c +++ b/common/device-scan.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include "kernel-lib/overflow.h" diff --git a/common/path-utils.h b/common/path-utils.h index dcbec284..86315760 100644 --- a/common/path-utils.h +++ b/common/path-utils.h @@ -18,6 +18,7 @@ #define __BTRFS_PATH_UTILS_H__ #include +#include char *path_canonicalize_dm_name(const char *ptname); char *path_canonicalize(const char *path); diff --git a/common/utils.c b/common/utils.c index 821dce34..5d2e8784 100644 --- a/common/utils.c +++ b/common/utils.c @@ -30,9 +30,6 @@ #include #include #include -#include -#include -#include #include #include #include diff --git a/convert/source-fs.h b/convert/source-fs.h index 7cf587d9..fb1327a1 100644 --- a/convert/source-fs.h +++ b/convert/source-fs.h @@ -18,8 +18,6 @@ #define __BTRFS_CONVERT_SOURCE_FS_H__ #include "kerncompat.h" -#include -#include #include #include diff --git a/convert/source-reiserfs.c b/convert/source-reiserfs.c index 29911c91..d117f05a 100644 --- a/convert/source-reiserfs.c +++ b/convert/source-reiserfs.c @@ -17,7 +17,6 @@ #if BTRFSCONVERT_REISERFS #include "kerncompat.h" -#include #include #include #include diff --git a/kernel-lib/bitops.h b/kernel-lib/bitops.h index 0acb8e6f..e0b85215 100644 --- a/kernel-lib/bitops.h +++ b/kernel-lib/bitops.h @@ -1,7 +1,6 @@ #ifndef _PERF_LINUX_BITOPS_H_ #define _PERF_LINUX_BITOPS_H_ -#include #include #include "common/internal.h" diff --git a/kernel-shared/zoned.c b/kernel-shared/zoned.c index 97c3465a..2a6892b3 100644 --- a/kernel-shared/zoned.c +++ b/kernel-shared/zoned.c @@ -1,7 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include -#include #include #include "kernel-lib/list.h"