git: cbda8bed15a0 - main - linuxkpi: Resolve duplicate global symbol name to fix LINT kernel build.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Sep 2022 20:38:49 UTC
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cbda8bed15a0de596f72a360debc968343cdc3ce commit cbda8bed15a0de596f72a360debc968343cdc3ce Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-09-20 20:36:08 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-09-20 20:37:15 +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 --- 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 f40b7984aa50..e925c6d8c2ae 100644 --- a/sys/compat/linuxkpi/common/include/linux/seq_file.h +++ b/sys/compat/linuxkpi/common/include/linux/seq_file.h @@ -76,8 +76,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 4099c9b4d062..054917e2fc24 100644 --- a/sys/compat/linuxkpi/common/src/linux_seq_file.c +++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c @@ -184,13 +184,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;