git: 2d1dfdab0950 - stable/13 - linuxkpi: Resolve duplicate global symbol name to fix LINT kernel build.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 29 Nov 2022 12:14:11 UTC
The branch stable/13 has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=2d1dfdab095051e91ab3ddb07d17be5a860f3b74
commit 2d1dfdab095051e91ab3ddb07d17be5a860f3b74
Author: Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-09-20 20:36:08 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-11-29 12:13:53 +0000
linuxkpi: Resolve duplicate global symbol name to fix LINT kernel build.
seq_printf() is defined in both spl_procfs_list.c and linux_seq_file.c .
Fix this by renaming the LinuxKPI ones and use macros to invoke the
correct function.
Reported by: jfree@
Differential Revision: https://reviews.freebsd.org/D35883
MFC after: 1 week
Sponsored by: NVIDIA Networking
(cherry picked from commit cbda8bed15a0de596f72a360debc968343cdc3ce)
---
sys/compat/linuxkpi/common/include/linux/seq_file.h | 7 +++++--
sys/compat/linuxkpi/common/src/linux_seq_file.c | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/seq_file.h b/sys/compat/linuxkpi/common/include/linux/seq_file.h
index 3b15c04503e2..8fb93646f9a5 100644
--- a/sys/compat/linuxkpi/common/include/linux/seq_file.h
+++ b/sys/compat/linuxkpi/common/include/linux/seq_file.h
@@ -79,8 +79,11 @@ off_t seq_lseek(struct linux_file *file, off_t offset, int whence);
int single_open(struct linux_file *, int (*)(struct seq_file *, void *), void *);
int single_release(struct inode *, struct linux_file *);
-void seq_vprintf(struct seq_file *m, const char *fmt, va_list args);
-void seq_printf(struct seq_file *m, const char *fmt, ...);
+void lkpi_seq_vprintf(struct seq_file *m, const char *fmt, va_list args);
+void lkpi_seq_printf(struct seq_file *m, const char *fmt, ...);
+
+#define seq_vprintf(...) lkpi_seq_vprintf(__VA_ARGS__)
+#define seq_printf(...) lkpi_seq_printf(__VA_ARGS__)
#define seq_puts(m, str) sbuf_printf((m)->buf, str)
#define seq_putc(m, str) sbuf_putc((m)->buf, str)
diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c
index 3e82206c0c5a..c358e4ae7dc1 100644
--- a/sys/compat/linuxkpi/common/src/linux_seq_file.c
+++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c
@@ -217,13 +217,13 @@ single_release(struct vnode *v, struct linux_file *f)
}
void
-seq_vprintf(struct seq_file *m, const char *fmt, va_list args)
+lkpi_seq_vprintf(struct seq_file *m, const char *fmt, va_list args)
{
sbuf_vprintf(m->buf, fmt, args);
}
void
-seq_printf(struct seq_file *m, const char *fmt, ...)
+lkpi_seq_printf(struct seq_file *m, const char *fmt, ...)
{
va_list args;