]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
libkmod: remove duplicate _func_ in error messages
authorEmil Velikov <emil.l.velikov@gmail.com>
Sun, 2 Aug 2026 13:19:58 +0000 (14:19 +0100)
committerLucas De Marchi <ldemarchi@kernel.org>
Thu, 6 Aug 2026 19:26:08 +0000 (14:26 -0500)
Our logging macros already provide __func__ throughout. Drop the few
instances which manually add it yet again.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/452
Signed-off-by: Lucas De Marchi <demarchi@kernel.org>
libkmod/libkmod-builtin.c

index 8cc1bd234842e4d2ad0ffd8e925dad6e5ada2a39..d807cb3c89afd68579738db1316db451ca52e48a 100644 (file)
@@ -75,7 +75,7 @@ static ssize_t get_strings(struct kmod_builtin_info *info, const char *modname,
                if (n == -1) {
                        if (!feof(info->fp)) {
                                count = -errno;
-                               ERR(info->ctx, "get_strings: %m\n");
+                               ERR(info->ctx, "%m\n");
                        }
                        break;
                }
@@ -84,8 +84,7 @@ static ssize_t get_strings(struct kmod_builtin_info *info, const char *modname,
                dot = strchr(line, '.');
                if (dot == NULL) {
                        count = -EINVAL;
-                       ERR(info->ctx, "get_strings: "
-                                      "unexpected string without modname prefix\n");
+                       ERR(info->ctx, "unexpected string without modname prefix\n");
                        return count;
                }
                if (strncmp(line, modname, modlen) || line[modlen] != '.') {
@@ -100,8 +99,7 @@ static ssize_t get_strings(struct kmod_builtin_info *info, const char *modname,
                }
                if (!strbuf_pushchars(buf, dot + 1) || !strbuf_pushchar(buf, '\0')) {
                        count = -ENOMEM;
-                       ERR(info->ctx, "get_strings: "
-                                      "failed to append modinfo string\n");
+                       ERR(info->ctx, "failed to append modinfo string\n");
                        return count;
                }
                count++;
@@ -109,8 +107,7 @@ static ssize_t get_strings(struct kmod_builtin_info *info, const char *modname,
 
        if (count == INTPTR_MAX) {
                count = -ENOMEM;
-               ERR(info->ctx, "get_strings: "
-                              "too many modinfo strings encountered\n");
+               ERR(info->ctx, "too many modinfo strings encountered\n");
                return count;
        }