]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: ras-events: removed obselete code under #if 0
authorShiju Jose <shiju.jose@huawei.com>
Mon, 19 Aug 2024 10:48:06 +0000 (11:48 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 12:27:18 +0000 (13:27 +0100)
Remove unused code enclosed under #if 0 to fix the checkpatch
warnings.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
ras-events.c

index 90228af2cfdd9d1b28805210bb1c2f12199bdf2d..309420dc0c6b855b1f9207924b77019f47b90174 100644 (file)
@@ -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 */