From: Jos Collin Date: Wed, 24 May 2017 01:04:50 +0000 (+0530) Subject: common: Remove redundant includes X-Git-Tag: v12.1.0~106^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=95fc248c402e550ecee298283dae4027936b78c5;p=ceph.git common: Remove redundant includes Fixes: http://tracker.ceph.com/issues/19883 (Partially) Signed-off-by: Jos Collin --- diff --git a/src/common/Cond.h b/src/common/Cond.h index 14022768303..aa53b60f234 100644 --- a/src/common/Cond.h +++ b/src/common/Cond.h @@ -16,16 +16,8 @@ #ifndef CEPH_COND_H #define CEPH_COND_H -#include -#include - #include "include/Context.h" -#include "common/ceph_time.h" -#include "common/Mutex.h" -#include "common/Clock.h" - - class Cond { // my bits pthread_cond_t _c; diff --git a/src/common/ConfUtils.cc b/src/common/ConfUtils.cc index 135e7da17ab..db957760bf9 100644 --- a/src/common/ConfUtils.cc +++ b/src/common/ConfUtils.cc @@ -13,13 +13,8 @@ */ #include -#include #include #include -#include -#include -#include -#include #include #include @@ -28,7 +23,6 @@ #include "common/utf8.h" #include "common/ConfUtils.h" -using std::cerr; using std::ostringstream; using std::pair; using std::string; diff --git a/src/common/ContextCompletion.h b/src/common/ContextCompletion.h index a8b5b689f00..37d82337eb8 100644 --- a/src/common/ContextCompletion.h +++ b/src/common/ContextCompletion.h @@ -3,7 +3,6 @@ #ifndef CEPH_ASYNC_COMPLETION_H #define CEPH_ASYNC_COMPLETION_H -#include "include/int_types.h" #include "include/Context.h" namespace ceph { diff --git a/src/common/Cycles.cc b/src/common/Cycles.cc index 656f08b40ce..b1888d34cff 100644 --- a/src/common/Cycles.cc +++ b/src/common/Cycles.cc @@ -28,13 +28,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -#include -#include - -#include "errno.h" #include "debug.h" -#include "Initialize.h" #include "Cycles.h" double Cycles::cycles_per_sec = 0; diff --git a/src/common/DecayCounter.h b/src/common/DecayCounter.h index 6a3ac4bcad4..e45aed8d2f2 100644 --- a/src/common/DecayCounter.h +++ b/src/common/DecayCounter.h @@ -17,8 +17,6 @@ #include "include/utime.h" -#include - /** * * TODO: normalize value based on some fucntion of half_life, diff --git a/src/common/code_environment.cc b/src/common/code_environment.cc index 662fa36c9bd..32fea3aee69 100644 --- a/src/common/code_environment.cc +++ b/src/common/code_environment.cc @@ -11,15 +11,10 @@ * Foundation. See file COPYING. * */ -#include "acconfig.h" #include "common/code_environment.h" -#include #include -#include -#include -#include #ifdef HAVE_SYS_PRCTL_H #include diff --git a/src/common/cohort_lru.h b/src/common/cohort_lru.h index 8a8b7669972..13c760f76f2 100644 --- a/src/common/cohort_lru.h +++ b/src/common/cohort_lru.h @@ -13,16 +13,8 @@ #ifndef COHORT_LRU_H #define COHORT_LRU_H -#include -#include #include -#include -#include -#include -#include -#include -#include -#include + #include "common/likely.h" #ifndef CACHE_LINE_SIZE diff --git a/src/common/common_init.cc b/src/common/common_init.cc index d796e933c4b..a62f67e2ee7 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -14,22 +14,9 @@ #include "common/admin_socket.h" #include "common/ceph_argparse.h" -#include "common/ceph_context.h" -#include "common/ceph_crypto.h" -#include "common/code_environment.h" #include "common/common_init.h" -#include "common/config.h" -#include "common/dout.h" -#include "common/errno.h" -#include "common/safe_io.h" #include "common/valgrind.h" -#include "common/version.h" -#include "common/strtol.h" #include "common/zipkin_trace.h" -#include "include/color.h" - -#include -#include #define dout_subsys ceph_subsys_ diff --git a/src/common/common_init.h b/src/common/common_init.h index 6ef4a90f56a..4c3c200bfb1 100644 --- a/src/common/common_init.h +++ b/src/common/common_init.h @@ -16,9 +16,6 @@ #define CEPH_COMMON_INIT_H #include -#include -#include -#include #include "common/code_environment.h" diff --git a/src/common/config.cc b/src/common/config.cc index 32a817deb8c..8c026f89a9f 100644 --- a/src/common/config.cc +++ b/src/common/config.cc @@ -12,36 +12,17 @@ * */ -#include "auth/Auth.h" -#include "common/ConfUtils.h" #include "common/ceph_argparse.h" #include "common/common_init.h" #include "common/config.h" #include "common/config_validators.h" -#include "common/static_assert.h" -#include "common/strtol.h" -#include "common/version.h" #include "include/str_list.h" -#include "include/types.h" #include "include/stringify.h" -#include "msg/msg_types.h" #include "osd/osd_types.h" #include "common/errno.h" #include "common/hostname.h" -#include "include/assert.h" - -#include -#include -#include -#include -#include -#include - -#include -#include #include -#include /* Don't use standard Ceph logging in this file. * We can't use logging until it's initialized, and a lot of the necessary @@ -57,10 +38,8 @@ using std::map; using std::list; -using std::multimap; using std::ostringstream; using std::pair; -using std::set; using std::string; const char *CEPH_CONF_FILE_DEFAULT = "$data_dir/config, /etc/ceph/$cluster.conf, ~/.ceph/$cluster.conf, $cluster.conf" diff --git a/src/common/config.h b/src/common/config.h index 887b2f7e939..4c970d24c72 100644 --- a/src/common/config.h +++ b/src/common/config.h @@ -15,19 +15,11 @@ #ifndef CEPH_CONFIG_H #define CEPH_CONFIG_H -#include -#include -#include -#include -#include -#include - #include "common/ConfUtils.h" #include "common/entity_name.h" #include "common/Mutex.h" #include "log/SubsystemMap.h" #include "common/config_obs.h" -#include "msg/msg_types.h" enum { CEPH_DEFAULT_CRUSH_REPLICATED_RULESET, diff --git a/src/common/config_validators.cc b/src/common/config_validators.cc index 0f224f94b8d..5a3392919ae 100644 --- a/src/common/config_validators.cc +++ b/src/common/config_validators.cc @@ -3,10 +3,7 @@ #include "common/config_validators.h" #include "include/stringify.h" -#include "include/rbd/features.h" -#include -#include -#include + #include #include diff --git a/src/common/deleter.h b/src/common/deleter.h index a13cf1f92dd..767ef4b1c57 100644 --- a/src/common/deleter.h +++ b/src/common/deleter.h @@ -23,11 +23,6 @@ #define CEPH_COMMON_DELETER_H #include -#include -#include -#include - -#include "include/assert.h" /// \addtogroup memory-module /// @{ diff --git a/src/common/dns_resolve.cc b/src/common/dns_resolve.cc index 77f5b529497..3227c88e2fd 100644 --- a/src/common/dns_resolve.cc +++ b/src/common/dns_resolve.cc @@ -12,18 +12,10 @@ * */ -#include -#include -#include #include -#include #include "dns_resolve.h" - -#include "acconfig.h" #include "common/debug.h" -#include "msg/msg_types.h" - #define dout_subsys ceph_subsys_ diff --git a/src/common/dns_resolve.h b/src/common/dns_resolve.h index dbcc79a7b5c..bf05c27b751 100644 --- a/src/common/dns_resolve.h +++ b/src/common/dns_resolve.h @@ -14,13 +14,9 @@ #ifndef CEPH_DNS_RESOLVE_H #define CEPH_DNS_RESOLVE_H -#include -#include -#include #include #include "common/Mutex.h" -#include "common/ceph_context.h" struct entity_addr_t; diff --git a/src/common/dout.h b/src/common/dout.h index d2340c9364c..8aa976b8cd1 100644 --- a/src/common/dout.h +++ b/src/common/dout.h @@ -21,12 +21,6 @@ #include "common/likely.h" #include "common/Clock.h" #include "log/Log.h" -#include "include/assert.h" - -#include -#include -#include -#include extern void dout_emergency(const char * const str); extern void dout_emergency(const std::string &str); diff --git a/src/common/entity_name.cc b/src/common/entity_name.cc index becad3a1209..533c1e97912 100644 --- a/src/common/entity_name.cc +++ b/src/common/entity_name.cc @@ -13,11 +13,8 @@ */ #include "common/entity_name.h" -#include "include/msgr.h" -#include #include -#include using std::string; diff --git a/src/common/entity_name.h b/src/common/entity_name.h index 66576cc1af2..e30b75f701f 100644 --- a/src/common/entity_name.h +++ b/src/common/entity_name.h @@ -16,13 +16,7 @@ #define CEPH_COMMON_ENTITY_NAME_H #include -#include -#include -#include -#include -#include "include/encoding.h" -#include "include/buffer_fwd.h" #include "msg/msg_types.h" /* Represents a Ceph entity name. diff --git a/src/common/errno.cc b/src/common/errno.cc index da06991baea..69e54254bab 100644 --- a/src/common/errno.cc +++ b/src/common/errno.cc @@ -2,8 +2,6 @@ #include "acconfig.h" #include -#include - #include std::string cpp_strerror(int err)