]> www.infradead.org Git - users/mchehab/rasdaemon.git/commit
rasdaemon: don't use braces for single statement blocks
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 15:13:50 +0000 (16:13 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 15:15:25 +0000 (16:15 +0100)
commitb7f6da3661a2a46c7a4cfc89945bcf1959f09975
tree937c70dc04bb00d72b164ae96817ff144946d648
parent4bf922f436c4753433a292adb86d9420d86d2323
rasdaemon: don't use braces for single statement blocks

Solve those checkpatch warnings:

WARNING: braces {} are not necessary for single statement blocks
+ if (clock_gettime(clk_id, &ts) == 0 && !strcmp(ev.error_type, "Corrected")) {
+ ras_record_row_error(ev.driver_detail, ev.error_count, ts.tv_sec, ev.address);
+ }

total: 0 errors, 1 warnings, 0 checks, 304 lines checked
WARNING: braces {} are not necessary for single statement blocks
+ if (!matched) {
+ log(TERM, LOG_INFO, "Improper %s, set to default off\n", env);
+ }

WARNING: braces {} are not necessary for any arm of this statement
+ if (rr1->type == GHES) {
[...]
+ } else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+ for (int i = 0; i < ROW_LOCATION_FIELDS_NUM; i++) {
+ dst->location_fields[i] = src->location_fields[i];
+ }

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
ras-mc-handler.c
ras-page-isolation.c