]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
ras-page-isolation.h: fix most coding style issues
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Nov 2024 06:55:02 +0000 (07:55 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 19 Nov 2024 06:57:11 +0000 (07:57 +0100)
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 <mchehab+huawei@kernel.org>
ras-page-isolation.h

index 048c72feafa495344d9e45a7a17a8f50445df9a1..633fdf6ee9612f3969b0afaeb6f624b8ab66d7d2 100644 (file)
@@ -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