From c204394b1b5cecf3c88d740c6c1f0c61bb257541 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 19 Nov 2024 07:55:02 +0100 Subject: [PATCH] ras-page-isolation.h: fix most coding style issues Fix several checkpatch.pl warnings: ras-page-isolation.h:50: WARNING:SPACING: missing space after enum definition ras-page-isolation.h:79: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses ras-page-isolation.h:80: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses ras-page-isolation.h:96: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test ras-page-isolation.h:119: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' It should be noticed that this warning was not addressed, as it seems to be a false-positive: ras-page-isolation.h:96: WARNING:CONSTANT_COMPARISON: Comparisons should place the constant on the right side of the test Signed-off-by: Mauro Carvalho Chehab --- ras-page-isolation.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ras-page-isolation.h b/ras-page-isolation.h index 048c72f..633fdf6 100644 --- a/ras-page-isolation.h +++ b/ras-page-isolation.h @@ -47,10 +47,11 @@ struct page_record { unsigned long excess; }; -enum row_location_type{ +enum row_location_type { GHES, DSM }; + enum apei_location_field_index { APEI_NODE, APEI_CARD, @@ -88,7 +89,7 @@ struct page_addr { LIST_ENTRY(page_addr) entry; unsigned long long addr; enum pstate offlined; - int count; + int count; time_t start; }; @@ -117,7 +118,8 @@ void ras_page_account_init(void); void ras_record_page_error(unsigned long long addr, unsigned int count, time_t time); void ras_row_account_init(void); -void ras_record_row_error(const char *detail, unsigned count, time_t time, unsigned long long addr); +void ras_record_row_error(const char *detail, unsigned int count, time_t time, + unsigned long long addr); void row_record_infos_free(void); #endif -- 2.49.0