]> www.infradead.org Git - users/mchehab/rasdaemon.git/commitdiff
rasdaemon: use __func__ instead of the name of the function
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 15:09:18 +0000 (16:09 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 18 Nov 2024 15:09:18 +0000 (16:09 +0100)
Solve some checkpatch warnings about not usint __func__ at the
rasdaemon logs.

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

index ea9ecc8fd71bd939ff6ef2ec7ac6eb823118b5f0..5d8118a6affcda6a2fca1757daed85b221928346 100644 (file)
@@ -110,7 +110,8 @@ static int wait_access(char *path, int ms)
                usleep(1000);
        }
 
-       log(ALL, LOG_WARNING, "wait_access() failed, %s not created in %d ms\n", path, ms);
+       log(ALL, LOG_WARNING, "%s failed, %s not created in %d ms\n",
+           __func__, path, ms);
        return -1;
 }
 
index b747d778c3597c21bb34456c7e887aeed45341cf..aa1dcf8df919dd21281b83489bcc65da63dc603f 100644 (file)
@@ -288,7 +288,6 @@ void ras_row_account_init(void)
 {
        row_offline_init();
        row_isolation_init();
-       log(TERM, LOG_INFO, "ras_row_account_init done\n");
 }
 
 void ras_page_account_init(void)
@@ -530,12 +529,14 @@ static int parse_value(const char *str, const char *anchor_str, int value_base,
        tmp = (int)strtol(start, &endptr, value_base);
 
        if (errno != 0) {
-               log(TERM, LOG_ERR, "parse_value error, start: %s, value_base: %d, errno: %d\n", start, value_base, errno);
+               log(TERM, LOG_ERR, "%s error, start: %s, value_base: %d, errno: %d\n",
+                   __func__, start, value_base, errno);
                return 1;
        }
 
        if (endptr == start) {
-               log(TERM, LOG_ERR, "parse_value error, start: %s, value_base: %d\n", start, value_base);
+               log(TERM, LOG_ERR, "%s error, start: %s, value_base: %d\n",
+                   __func__, start, value_base);
                return 1;
        }
        *value = tmp;