diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2022-09-20 20:36:08 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2022-11-29 12:13:53 +0000 |
commit | 2d1dfdab095051e91ab3ddb07d17be5a860f3b74 (patch) | |
tree | 5ce9fb0691dd62116e9de350471b4b3605d9e926 | |
parent | 5a612b4409286d2dad5d4b482fca6ccbd8c43186 (diff) |
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)
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/seq_file.h | 7 | ||||
-rw-r--r-- | 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; |