From: Shiju Jose Date: Mon, 19 Aug 2024 10:48:06 +0000 (+0100) Subject: rasdaemon: ras-events: removed obselete code under #if 0 X-Git-Tag: v0.8.2~31 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1779d4d80394e6041cc5b0ed0ce79b292f754125;p=users%2Fmchehab%2Frasdaemon.git rasdaemon: ras-events: removed obselete code under #if 0 Remove unused code enclosed under #if 0 to fix the checkpatch warnings. Signed-off-by: Shiju Jose Signed-off-by: Mauro Carvalho Chehab --- diff --git a/ras-events.c b/ras-events.c index 90228af..309420d 100644 --- a/ras-events.c +++ b/ras-events.c @@ -460,9 +460,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)); @@ -563,9 +560,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)) { @@ -595,10 +589,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 @@ -608,7 +598,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 */