diff --git a/ras-arm-handler.c b/ras-arm-handler.c index 949be69..ce10022 100644 --- a/ras-arm-handler.c +++ b/ras-arm-handler.c @@ -271,7 +271,7 @@ static void parse_arm_err_info(struct trace_seq *s, uint32_t type, uint64_t erro restartable_pc = ((error_info >> ARM_ERR_RESTARTABLE_PC_SHIFT) & ARM_ERR_RESTARTABLE_PC_MASK); if (restartable_pc) - trace_seq_printf(s, " Program execution can be restarted reliably at the PC associated with the error"); + trace_seq_printf(s, " Program execution can be restartable reliably at the PC"); } /* The rest of the fields are specific to bus errors */ diff --git a/ras-events.c b/ras-events.c index b6e80b2..4b2dc4d 100644 --- a/ras-events.c +++ b/ras-events.c @@ -310,6 +310,7 @@ static void setup_event_trigger(char *event) } } +#ifdef HAVE_DISKERROR #ifndef HAVE_BLK_RQ_ERROR /* * Set kernel filter. libtrace doesn't provide an API for setting filters @@ -343,6 +344,7 @@ static int filter_ras_mc_event(struct ras_events *ras, char *group, char *event, return 0; } #endif +#endif /* * Tracing read code @@ -457,9 +459,6 @@ static int read_ras_event_all_cpus(struct pthread_data *pdata, int warnonce[n_cpus]; char pipe_raw[PATH_MAX]; int legacy_kernel = 0; -#if 0 - int need_sleep = 0; -#endif memset(&warnonce, 0, sizeof(warnonce)); @@ -560,9 +559,6 @@ static int read_ras_event_all_cpus(struct pthread_data *pdata, log(TERM, LOG_INFO, "Error on CPU %i\n", i); warnonce[i]++; -#if 0 - need_sleep = 1; -#endif } } if (!(fds[i].revents & POLLIN)) { @@ -592,10 +588,6 @@ static int read_ras_event_all_cpus(struct pthread_data *pdata, count_nready++; } } -#if 0 - if (need_sleep) - sleep(POLLING_TIME); -#else /* * If we enable fallback mode, it will always be used, as * poll is still not working fine, IMHO @@ -605,7 +597,6 @@ static int read_ras_event_all_cpus(struct pthread_data *pdata, legacy_kernel = 1; break; } -#endif } while (1); /* poll() is not supported. We need to fallback to the old way */ diff --git a/ras-mce-handler.c b/ras-mce-handler.c index ea58ac0..bf1fac0 100644 --- a/ras-mce-handler.c +++ b/ras-mce-handler.c @@ -314,28 +314,10 @@ static void report_mce_event(struct ras_events *ras, if (*e->mc_location) trace_seq_printf(s, ", %s", e->mc_location); -#if 0 - /* - * While the logic for decoding tsc is there at mcelog, why to - * decode/print it, if we already got the uptime from the - * tracing event? Let's just discard it for now. - */ - trace_seq_printf(s, ", tsc= %d", e->tsc); - trace_seq_printf(s, ", walltime= %d", e->walltime); -#endif - trace_seq_printf(s, ", cpu_type= %s", cputype_name[mce->cputype]); trace_seq_printf(s, ", cpu= %d", e->cpu); trace_seq_printf(s, ", socketid= %d", e->socketid); -#if 0 - /* - * The CPU vendor is already reported from mce->cputype - */ - trace_seq_printf(s, ", cpuvendor= %d", e->cpuvendor); - trace_seq_printf(s, ", cpuid= %d", e->cpuid); -#endif - if (e->ip) trace_seq_printf(s, ", ip= %llx%s", (long long)e->ip, diff --git a/ras-memory-failure-handler.c b/ras-memory-failure-handler.c index 7ca0e80..4d20ce8 100644 --- a/ras-memory-failure-handler.c +++ b/ras-memory-failure-handler.c @@ -4,6 +4,7 @@ * Copyright (c) Huawei Technologies Co., Ltd. 2020. All rights reserved. */ +#define _GNU_SOURCE #include #include #include diff --git a/ras-non-standard-handler.h b/ras-non-standard-handler.h index e73dbcb..fbaf2aa 100644 --- a/ras-non-standard-handler.h +++ b/ras-non-standard-handler.h @@ -24,7 +24,7 @@ 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 - sqlite3_stmt *stmt_dec_record; + struct sqlite3_stmt *stmt_dec_record; #endif }; diff --git a/rbtree.h b/rbtree.h index 4ef97f4..5765777 100644 --- a/rbtree.h +++ b/rbtree.h @@ -114,7 +114,6 @@ static inline void rb_set_color(struct rb_node *rb, int color) rb->rb_parent_color = (rb->rb_parent_color & ~1) | color; } -#define RB_ROOT (struct rb_root) { NULL, } #define rb_entry(ptr, type, member) container_of(ptr, type, member) #define RB_EMPTY_ROOT(root) (!(root)->rb_node)