From bdcec55c460cec5497ea00542cebd1ae7c5dea41 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 18 Jul 2024 11:45:16 +0200 Subject: [PATCH] rasdaemon: alphabetically sort includes Reorder includes to ensure that they'll all be alphabetically sorted. Signed-off-by: Mauro Carvalho Chehab --- bitfield.c | 4 ++-- mce-amd-k8.c | 2 +- mce-amd-smca.c | 2 +- mce-intel-broadwell-de.c | 4 ++-- mce-intel-broadwell-epex.c | 4 ++-- mce-intel-dunnington.c | 4 ++-- mce-intel-haswell.c | 4 ++-- mce-intel-i10nm.c | 2 +- mce-intel-ivb.c | 4 ++-- mce-intel-knl.c | 4 ++-- mce-intel-nehalem.c | 4 ++-- mce-intel-p4-p6.c | 4 ++-- mce-intel-sb.c | 4 ++-- mce-intel-skylake-xeon.c | 4 ++-- mce-intel-tulsa.c | 4 ++-- mce-intel.c | 8 ++++---- non-standard-ampere.c | 9 +++++---- non-standard-ampere.h | 5 ++++- non-standard-hisi_hip08.c | 7 ++++--- non-standard-hisilicon.c | 5 +++-- non-standard-hisilicon.h | 2 +- non-standard-jaguarmicro.c | 15 ++++++++------- non-standard-jaguarmicro.h | 3 ++- non-standard-yitian.c | 9 +++++---- non-standard-yitian.h | 2 ++ queue.c | 2 ++ ras-aer-handler.c | 8 +++++--- ras-aer-handler.h | 3 ++- ras-arm-handler.c | 11 ++++++----- ras-arm-handler.h | 3 ++- ras-cpu-isolation.c | 9 +++++---- ras-cxl-handler.c | 7 ++++--- ras-cxl-handler.h | 3 ++- ras-devlink-handler.c | 5 +++-- ras-devlink-handler.h | 3 ++- ras-diskerror-handler.c | 12 +++++++----- ras-diskerror-handler.h | 3 ++- ras-events.c | 2 +- ras-extlog-handler.c | 4 ++-- ras-extlog-handler.h | 2 +- ras-mc-handler.c | 4 ++-- ras-mc-handler.h | 3 ++- ras-mce-handler.c | 8 ++++---- ras-mce-handler.h | 2 +- ras-memory-failure-handler.c | 2 +- ras-memory-failure-handler.h | 3 ++- ras-non-standard-handler.c | 9 +++++---- ras-non-standard-handler.h | 8 ++++++-- ras-page-isolation.c | 2 +- ras-page-isolation.h | 2 +- ras-record.c | 23 ++++++++++++----------- ras-record.h | 5 +++-- ras-report.c | 6 +++--- ras-report.h | 8 ++++---- rasdaemon.c | 4 ++-- trigger.c | 3 ++- 56 files changed, 162 insertions(+), 126 deletions(-) diff --git a/bitfield.c b/bitfield.c index 17e154a..7766579 100644 --- a/bitfield.c +++ b/bitfield.c @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" unsigned int bitfield_msg(char *buf, size_t len, const char * const *bitarray, unsigned int array_len, diff --git a/mce-amd-k8.c b/mce-amd-k8.c index 3d71e7e..a937516 100644 --- a/mce-amd-k8.c +++ b/mce-amd-k8.c @@ -22,8 +22,8 @@ #include #include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" #define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */ #define K8_MCE_THRESHOLD_TOP (K8_MCE_THRESHOLD_BASE + 6 * 9) diff --git a/mce-amd-smca.c b/mce-amd-smca.c index 298a914..f3d4171 100644 --- a/mce-amd-smca.c +++ b/mce-amd-smca.c @@ -14,8 +14,8 @@ #include #include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* MCA_STATUS REGISTER FOR FAMILY 17H *********************** Higher 32-bits ***************************** diff --git a/mce-intel-broadwell-de.c b/mce-intel-broadwell-de.c index ad2421c..00670e1 100644 --- a/mce-intel-broadwell-de.c +++ b/mce-intel-broadwell-de.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Table 16-24 */ diff --git a/mce-intel-broadwell-epex.c b/mce-intel-broadwell-epex.c index 52b3815..9646e4c 100644 --- a/mce-intel-broadwell-epex.c +++ b/mce-intel-broadwell-epex.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Table 16-20 */ diff --git a/mce-intel-dunnington.c b/mce-intel-dunnington.c index 1114fd7..ee75991 100644 --- a/mce-intel-dunnington.c +++ b/mce-intel-dunnington.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* Follows Intel IA32 SDM 3b Appendix E.2.1 ++ */ diff --git a/mce-intel-haswell.c b/mce-intel-haswell.c index 12ec3c3..8b44464 100644 --- a/mce-intel-haswell.c +++ b/mce-intel-haswell.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Table 16-20 */ diff --git a/mce-intel-i10nm.c b/mce-intel-i10nm.c index a486866..ea91963 100644 --- a/mce-intel-i10nm.c +++ b/mce-intel-i10nm.c @@ -24,8 +24,8 @@ #include #include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" static char *pcu_1[] = { [0x0D] = "MCA_LLC_BIST_ACTIVE_TIMEOUT", diff --git a/mce-intel-ivb.c b/mce-intel-ivb.c index 3204b58..36b6680 100644 --- a/mce-intel-ivb.c +++ b/mce-intel-ivb.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Table 16-17 */ diff --git a/mce-intel-knl.c b/mce-intel-knl.c index ff00ca9..50baa2a 100644 --- a/mce-intel-knl.c +++ b/mce-intel-knl.c @@ -14,11 +14,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" static struct field memctrl_mc7[] = { SBITFIELD(16, "CA Parity error"), diff --git a/mce-intel-nehalem.c b/mce-intel-nehalem.c index 1ab0ef3..aca85e7 100644 --- a/mce-intel-nehalem.c +++ b/mce-intel-nehalem.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Appendix E.3.2 ff */ diff --git a/mce-intel-p4-p6.c b/mce-intel-p4-p6.c index ecd266f..9f93314 100644 --- a/mce-intel-p4-p6.c +++ b/mce-intel-p4-p6.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* Decode P4 and P6 family (p6old and Core2) model specific errors */ diff --git a/mce-intel-sb.c b/mce-intel-sb.c index 0d546b9..bffdd5b 100644 --- a/mce-intel-sb.c +++ b/mce-intel-sb.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Table 16.4.1 */ diff --git a/mce-intel-skylake-xeon.c b/mce-intel-skylake-xeon.c index fdf02b9..e8ff337 100644 --- a/mce-intel-skylake-xeon.c +++ b/mce-intel-skylake-xeon.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Table 16-27 */ diff --git a/mce-intel-tulsa.c b/mce-intel-tulsa.c index 7607e02..ad99804 100644 --- a/mce-intel-tulsa.c +++ b/mce-intel-tulsa.c @@ -17,11 +17,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include #include +#include -#include "ras-mce-handler.h" #include "bitfield.h" +#include "ras-mce-handler.h" /* See IA32 SDM Vol3B Appendix E.4.1 ff */ diff --git a/mce-intel.c b/mce-intel.c index 58bcba3..bec84ec 100644 --- a/mce-intel.c +++ b/mce-intel.c @@ -21,15 +21,15 @@ #include #include -#include #include -#include -#include +#include #include +#include +#include +#include "bitfield.h" #include "ras-logger.h" #include "ras-mce-handler.h" -#include "bitfield.h" #define MCE_THERMAL_BANK (MCE_EXTENDED_BANK + 0) #define MCE_TIMEOUT_BANK (MCE_EXTENDED_BANK + 90) diff --git a/non-standard-ampere.c b/non-standard-ampere.c index b96e5c2..6f6e435 100644 --- a/non-standard-ampere.c +++ b/non-standard-ampere.c @@ -8,15 +8,16 @@ * */ +#include #include #include #include -#include -#include "types.h" + +#include "non-standard-ampere.h" #include "ras-logger.h" -#include "ras-report.h" #include "ras-non-standard-handler.h" -#include "non-standard-ampere.h" +#include "ras-report.h" +#include "types.h" /*Armv8 RAS compicant Error Record(APEI and BMC Reporting) Payload Type 0*/ static const char * const disp_payload0_err_reg_name[] = { diff --git a/non-standard-ampere.h b/non-standard-ampere.h index 58c203a..1e1a0fa 100644 --- a/non-standard-ampere.h +++ b/non-standard-ampere.h @@ -11,9 +11,12 @@ #ifndef __NON_STANDARD_AMPERE_H #define __NON_STANDARD_AMPERE_H -#include "ras-events.h" #include +#include "types.h" + +struct ras_ns_ev_decoder; + #define SOCKET_NUM(x) (((x) >> 14) & 0x3) #define PAYLOAD_TYPE(x) (((x) >> 6) & 0x3) #define TYPE(x) ((x) & 0x3f) diff --git a/non-standard-hisi_hip08.c b/non-standard-hisi_hip08.c index 4776832..8534296 100644 --- a/non-standard-hisi_hip08.c +++ b/non-standard-hisi_hip08.c @@ -11,11 +11,12 @@ #include #include #include -#include "types.h" + +#include "non-standard-hisilicon.h" #include "ras-logger.h" -#include "ras-report.h" #include "ras-non-standard-handler.h" -#include "non-standard-hisilicon.h" +#include "ras-report.h" +#include "types.h" /* HISI OEM error definitions */ /* HISI OEM format1 error definitions */ diff --git a/non-standard-hisilicon.c b/non-standard-hisilicon.c index 3d9fc30..b8cd4d0 100644 --- a/non-standard-hisilicon.c +++ b/non-standard-hisilicon.c @@ -11,10 +11,11 @@ #include #include #include -#include "types.h" + +#include "non-standard-hisilicon.h" #include "ras-logger.h" #include "ras-report.h" -#include "non-standard-hisilicon.h" +#include "types.h" #define HISI_BUF_LEN 2048 #define HISI_PCIE_INFO_BUF_LEN 256 diff --git a/non-standard-hisilicon.h b/non-standard-hisilicon.h index 75b911e..f39fabe 100644 --- a/non-standard-hisilicon.h +++ b/non-standard-hisilicon.h @@ -11,8 +11,8 @@ #ifndef __NON_STANDARD_HISILICON_H #define __NON_STANDARD_HISILICON_H -#include "ras-non-standard-handler.h" #include "ras-mc-handler.h" +#include "ras-non-standard-handler.h" #define HISI_SNPRINTF mce_snprintf diff --git a/non-standard-jaguarmicro.c b/non-standard-jaguarmicro.c index 745b656..76ba2a4 100644 --- a/non-standard-jaguarmicro.c +++ b/non-standard-jaguarmicro.c @@ -8,16 +8,17 @@ * */ +#include "non-standard-jaguarmicro.h" +#include "ras-logger.h" +#include "ras-mce-handler.h" +#include "ras-non-standard-handler.h" +#include "ras-report.h" +#include "types.h" + +#include #include #include #include -#include -#include "types.h" -#include "ras-logger.h" -#include "ras-report.h" -#include "ras-non-standard-handler.h" -#include "non-standard-jaguarmicro.h" -#include "ras-mce-handler.h" #define JM_BUF_LEN 256 #define JM_REG_BUF_LEN 2048 diff --git a/non-standard-jaguarmicro.h b/non-standard-jaguarmicro.h index d5db73d..34c847a 100644 --- a/non-standard-jaguarmicro.h +++ b/non-standard-jaguarmicro.h @@ -11,8 +11,9 @@ #ifndef __NON_STANDARD_JAGUAR_H #define __NON_STANDARD_JAGUAR_H -#include "ras-events.h" #include + +#include "ras-events.h" #include "ras-mce-handler.h" #define PAYLOAD_TYPE_0 0x00 diff --git a/non-standard-yitian.c b/non-standard-yitian.c index d3dae38..3f1eeb2 100644 --- a/non-standard-yitian.c +++ b/non-standard-yitian.c @@ -8,15 +8,16 @@ * */ +#include #include #include #include -#include -#include "types.h" + +#include "non-standard-yitian.h" #include "ras-logger.h" -#include "ras-report.h" #include "ras-non-standard-handler.h" -#include "non-standard-yitian.h" +#include "ras-report.h" +#include "types.h" static const char * const yitian_ddr_payload_err_reg_name[] = { "Error Type:", diff --git a/non-standard-yitian.h b/non-standard-yitian.h index e4f9db8..9f5af72 100644 --- a/non-standard-yitian.h +++ b/non-standard-yitian.h @@ -14,6 +14,8 @@ #include "ras-events.h" #include "traceevent/event-parse.h" +struct ras_ns_ev_decoder; + #define YITIAN_RAS_TYPE_DDR 0x50 struct yitian_payload_header { diff --git a/queue.c b/queue.c index 9134394..655ccd8 100644 --- a/queue.c +++ b/queue.c @@ -11,8 +11,10 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ + #include #include + #include "queue.h" #include "ras-logger.h" diff --git a/ras-aer-handler.c b/ras-aer-handler.c index 8cfc663..138abe2 100644 --- a/ras-aer-handler.c +++ b/ras-aer-handler.c @@ -15,16 +15,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + #include #include #include -#include #include +#include + +#include "bitfield.h" #include "ras-aer-handler.h" -#include "types.h" #include "ras-logger.h" -#include "bitfield.h" #include "ras-report.h" +#include "types.h" /* bit field meaning for correctable error */ static const char *aer_cor_errors[32] = { diff --git a/ras-aer-handler.h b/ras-aer-handler.h index cb99550..0b483a5 100644 --- a/ras-aer-handler.h +++ b/ras-aer-handler.h @@ -19,9 +19,10 @@ #ifndef __RAS_AER_HANDLER_H #define __RAS_AER_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + int ras_aer_event_handler(struct trace_seq *s, struct tep_record *record, struct tep_event *event, void *context); diff --git a/ras-arm-handler.c b/ras-arm-handler.c index 1267187..c090943 100644 --- a/ras-arm-handler.c +++ b/ras-arm-handler.c @@ -14,15 +14,16 @@ #include #include #include -#include #include +#include + +#include "non-standard-ampere.h" #include "ras-arm-handler.h" -#include "types.h" +#include "ras-cpu-isolation.h" #include "ras-logger.h" -#include "ras-report.h" #include "ras-non-standard-handler.h" -#include "non-standard-ampere.h" -#include "ras-cpu-isolation.h" +#include "ras-report.h" +#include "types.h" #define ARM_ERR_VALID_ERROR_COUNT BIT(0) #define ARM_ERR_VALID_FLAGS BIT(1) diff --git a/ras-arm-handler.h b/ras-arm-handler.h index 5b2fd47..c2499ea 100644 --- a/ras-arm-handler.h +++ b/ras-arm-handler.h @@ -14,9 +14,10 @@ #ifndef __RAS_ARM_HANDLER_H #define __RAS_ARM_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + /* * ARM Processor Error Information Structure, According to * UEFI_2_9 specification chapter N2.4.4. diff --git a/ras-cpu-isolation.c b/ras-cpu-isolation.c index e551c61..0daa63a 100644 --- a/ras-cpu-isolation.c +++ b/ras-cpu-isolation.c @@ -15,13 +15,14 @@ #include #include #include -#include -#include #include -#include + #include -#include "ras-logger.h" +#include +#include +#include #include "ras-cpu-isolation.h" +#include "ras-logger.h" #define SECOND_OF_MON (30 * 24 * 60 * 60) #define SECOND_OF_DAY (24 * 60 * 60) diff --git a/ras-cxl-handler.c b/ras-cxl-handler.c index 02942bd..dd3cfeb 100644 --- a/ras-cxl-handler.c +++ b/ras-cxl-handler.c @@ -12,17 +12,18 @@ * GNU General Public License for more details. */ +#include #include #include #include -#include #include +#include + #include "ras-cxl-handler.h" -#include "types.h" #include "ras-logger.h" #include "ras-record.h" #include "ras-report.h" -#include +#include "types.h" /* Common Functions */ static void convert_timestamp(unsigned long long ts, char *ts_ptr, uint16_t size) diff --git a/ras-cxl-handler.h b/ras-cxl-handler.h index 1ea0f93..5495f0d 100644 --- a/ras-cxl-handler.h +++ b/ras-cxl-handler.h @@ -15,9 +15,10 @@ #ifndef __RAS_CXL_HANDLER_H #define __RAS_CXL_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + int ras_cxl_poison_event_handler(struct trace_seq *s, struct tep_record *record, struct tep_event *event, void *context); diff --git a/ras-devlink-handler.c b/ras-devlink-handler.c index dfe2272..e275521 100644 --- a/ras-devlink-handler.c +++ b/ras-devlink-handler.c @@ -20,12 +20,13 @@ #include #include #include -#include #include +#include + #include "ras-devlink-handler.h" -#include "types.h" #include "ras-logger.h" #include "ras-report.h" +#include "types.h" int ras_net_xmit_timeout_handler(struct trace_seq *s, struct tep_record *record, diff --git a/ras-devlink-handler.h b/ras-devlink-handler.h index ccda865..a759ec1 100644 --- a/ras-devlink-handler.h +++ b/ras-devlink-handler.h @@ -19,9 +19,10 @@ #ifndef __RAS_DEVLINK_HANDLER_H #define __RAS_DEVLINK_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + int ras_net_xmit_timeout_handler(struct trace_seq *s, struct tep_record *record, struct tep_event *event, void *context); diff --git a/ras-diskerror-handler.c b/ras-diskerror-handler.c index 527f7dd..cf9cef0 100644 --- a/ras-diskerror-handler.c +++ b/ras-diskerror-handler.c @@ -17,19 +17,21 @@ */ #define _GNU_SOURCE +#include #include #include -#ifndef __dev_t_defined -#include -#endif /* __dev_t_defined */ #include -#include #include #include + #include "ras-diskerror-handler.h" -#include "types.h" #include "ras-logger.h" #include "ras-report.h" +#include "types.h" + +#ifndef __dev_t_defined +#include +#endif /* __dev_t_defined */ static const struct { int error; diff --git a/ras-diskerror-handler.h b/ras-diskerror-handler.h index 5f86a9e..9581b38 100644 --- a/ras-diskerror-handler.h +++ b/ras-diskerror-handler.h @@ -19,9 +19,10 @@ #ifndef __RAS_DISKERROR_HANDLER_H #define __RAS_DISKERROR_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + int ras_diskerror_event_handler(struct trace_seq *s, struct tep_record *record, struct tep_event *event, void *context); diff --git a/ras-events.c b/ras-events.c index a2a3773..2905644 100644 --- a/ras-events.c +++ b/ras-events.c @@ -38,6 +38,7 @@ #include "ras-cxl-handler.h" #include "ras-devlink-handler.h" #include "ras-diskerror-handler.h" +#include "ras-events.h" #include "ras-extlog-handler.h" #include "ras-logger.h" #include "ras-mce-handler.h" @@ -45,7 +46,6 @@ #include "ras-memory-failure-handler.h" #include "ras-non-standard-handler.h" #include "ras-page-isolation.h" -#include "ras-events.h" #include "ras-record.h" #include "trigger.h" diff --git a/ras-extlog-handler.c b/ras-extlog-handler.c index ba48f11..8b5680f 100644 --- a/ras-extlog-handler.c +++ b/ras-extlog-handler.c @@ -22,13 +22,13 @@ #include #include #include -#include #include +#include #include "ras-extlog-handler.h" #include "ras-logger.h" -#include "types.h" #include "ras-report.h" +#include "types.h" static char *err_type(int etype) { diff --git a/ras-extlog-handler.h b/ras-extlog-handler.h index d9a7b1d..92f5c65 100644 --- a/ras-extlog-handler.h +++ b/ras-extlog-handler.h @@ -20,9 +20,9 @@ #define __RAS_EXTLOG_HANDLER_H #include +#include #include "ras-events.h" -#include int ras_extlog_mem_event_handler(struct trace_seq *s, struct tep_record *record, diff --git a/ras-mc-handler.c b/ras-mc-handler.c index 74d8850..00d9843 100644 --- a/ras-mc-handler.c +++ b/ras-mc-handler.c @@ -24,12 +24,12 @@ #include #include -#include "ras-mc-handler.h" #include "ras-logger.h" +#include "ras-mc-handler.h" #include "ras-page-isolation.h" -#include "types.h" #include "ras-report.h" #include "trigger.h" +#include "types.h" #define MAX_ENV 30 static const char *mc_ce_trigger = NULL; diff --git a/ras-mc-handler.h b/ras-mc-handler.h index c39fee3..72b3c2a 100644 --- a/ras-mc-handler.h +++ b/ras-mc-handler.h @@ -19,9 +19,10 @@ #ifndef __RAS_MC_HANDLER_H #define __RAS_MC_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + void mc_event_trigger_setup(void); int ras_mc_event_handler(struct trace_seq *s, diff --git a/ras-mce-handler.c b/ras-mce-handler.c index aaf766f..fe49985 100644 --- a/ras-mce-handler.c +++ b/ras-mce-handler.c @@ -18,17 +18,17 @@ #include #include +#include #include #include #include -#include -#include #include +#include -#include "ras-mce-handler.h" -#include "types.h" #include "ras-logger.h" +#include "ras-mce-handler.h" #include "ras-report.h" +#include "types.h" /* * The code below were adapted from Andi Kleen/Intel/SuSe mcelog code, diff --git a/ras-mce-handler.h b/ras-mce-handler.h index 74d913a..21818a4 100644 --- a/ras-mce-handler.h +++ b/ras-mce-handler.h @@ -20,9 +20,9 @@ #define __RAS_MCE_HANDLER_H #include +#include #include "ras-events.h" -#include enum cputype { CPU_GENERIC, diff --git a/ras-memory-failure-handler.c b/ras-memory-failure-handler.c index a93b034..1a4d17a 100644 --- a/ras-memory-failure-handler.c +++ b/ras-memory-failure-handler.c @@ -19,9 +19,9 @@ #include "ras-logger.h" #include "ras-memory-failure-handler.h" -#include "types.h" #include "ras-report.h" #include "trigger.h" +#include "types.h" /* Memory failure - various types of pages */ enum mf_action_page_type { diff --git a/ras-memory-failure-handler.h b/ras-memory-failure-handler.h index e299eae..217f156 100644 --- a/ras-memory-failure-handler.h +++ b/ras-memory-failure-handler.h @@ -15,9 +15,10 @@ #ifndef __RAS_MEMORY_FAILURE_HANDLER_H #define __RAS_MEMORY_FAILURE_HANDLER_H -#include "ras-events.h" #include +#include "ras-events.h" + void mem_fail_event_trigger_setup(void); int ras_memory_failure_event_handler(struct trace_seq *s, struct tep_record *record, diff --git a/ras-non-standard-handler.c b/ras-non-standard-handler.c index 887ab14..7d3cecc 100644 --- a/ras-non-standard-handler.c +++ b/ras-non-standard-handler.c @@ -11,16 +11,17 @@ * GNU General Public License for more details. */ +#include #include #include -#include #include -#include #include -#include "ras-non-standard-handler.h" -#include "types.h" +#include + #include "ras-logger.h" +#include "ras-non-standard-handler.h" #include "ras-report.h" +#include "types.h" static struct ras_ns_ev_decoder *ras_ns_ev_dec_list; diff --git a/ras-non-standard-handler.h b/ras-non-standard-handler.h index 5c6746d..3b7302b 100644 --- a/ras-non-standard-handler.h +++ b/ras-non-standard-handler.h @@ -14,9 +14,14 @@ #ifndef __RAS_NON_STANDARD_HANDLER_H #define __RAS_NON_STANDARD_HANDLER_H +#include + #include "ras-events.h" #include "ras-record.h" -#include + +#ifdef HAVE_SQLITE3 +#include +#endif struct ras_ns_ev_decoder { struct ras_ns_ev_decoder *next; @@ -26,7 +31,6 @@ struct ras_ns_ev_decoder { int (*decode)(struct ras_events *ras, struct ras_ns_ev_decoder *ev_decoder, struct trace_seq *s, struct ras_non_standard_event *event); #ifdef HAVE_SQLITE3 -#include sqlite3_stmt *stmt_dec_record; #endif }; diff --git a/ras-page-isolation.c b/ras-page-isolation.c index fcf3048..0589492 100644 --- a/ras-page-isolation.c +++ b/ras-page-isolation.c @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/ras-page-isolation.h b/ras-page-isolation.h index 7da68c0..36c21a1 100644 --- a/ras-page-isolation.h +++ b/ras-page-isolation.h @@ -18,8 +18,8 @@ #include #include -#include "types.h" #include "rbtree.h" +#include "types.h" #define PAGE_SHIFT 12 #define PAGE_SIZE BIT(PAGE_SHIFT) diff --git a/ras-record.c b/ras-record.c index e363137..ed5bd48 100644 --- a/ras-record.c +++ b/ras-record.c @@ -17,22 +17,23 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -/* - * BuildRequires: sqlite-devel - */ - -#include +#include #include #include -#include -#include +#include #include -#include "ras-events.h" -#include "ras-record.h" -#include "ras-mc-handler.h" +#include + #include "ras-aer-handler.h" -#include "ras-mce-handler.h" +#include "ras-events.h" #include "ras-logger.h" +#include "ras-mce-handler.h" +#include "ras-mc-handler.h" +#include "ras-record.h" + +/* + * BuildRequires: sqlite-devel + */ /* #define DEBUG_SQL 1 */ diff --git a/ras-record.h b/ras-record.h index 27e484b..3fe332e 100644 --- a/ras-record.h +++ b/ras-record.h @@ -20,8 +20,10 @@ #ifndef __RAS_RECORD_H #define __RAS_RECORD_H -#include +#include #include +#include + #include "config.h" #include "types.h" @@ -261,7 +263,6 @@ struct ras_cxl_memory_module_event; #ifdef HAVE_SQLITE3 -#include struct sqlite3_priv { sqlite3 *db; diff --git a/ras-report.c b/ras-report.c index cf841ec..d7759cb 100644 --- a/ras-report.c +++ b/ras-report.c @@ -13,11 +13,11 @@ #include #include -#include -#include -#include #include +#include #include +#include +#include #include "ras-report.h" diff --git a/ras-report.h b/ras-report.h index 0c66446..8c2168b 100644 --- a/ras-report.h +++ b/ras-report.h @@ -14,12 +14,12 @@ #ifndef __RAS_REPORT_H #define __RAS_REPORT_H -#include "types.h" +#include "ras-aer-handler.h" #include "ras-events.h" -#include "ras-record.h" -#include "ras-mc-handler.h" #include "ras-mce-handler.h" -#include "ras-aer-handler.h" +#include "ras-mc-handler.h" +#include "ras-record.h" +#include "types.h" /* Maximal length of backtrace. */ #define MAX_BACKTRACE_SIZE (1024 * 1024) diff --git a/rasdaemon.c b/rasdaemon.c index 6f3a272..79b1605 100644 --- a/rasdaemon.c +++ b/rasdaemon.c @@ -22,10 +22,10 @@ #include #include -#include "types.h" -#include "ras-logger.h" #include "ras-events.h" +#include "ras-logger.h" #include "ras-record.h" +#include "types.h" /* * Arguments(argp) handling logic and main diff --git a/trigger.c b/trigger.c index 3031f4b..113ac04 100644 --- a/trigger.c +++ b/trigger.c @@ -1,8 +1,9 @@ #define _GNU_SOURCE #include -#include #include #include +#include + #include "ras-logger.h" #include "trigger.h" -- 2.49.0