Skip to content

Commit

Permalink
ras-page-isolation.h: fix most coding style issues
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mchehab committed Nov 19, 2024
1 parent bcaa65d commit c204394
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ras-page-isolation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
};

Expand Down Expand Up @@ -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

0 comments on commit c204394

Please sign in to comment.