diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2022-09-20 20:36:08 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2022-09-20 20:37:15 +0000 |
commit | cbda8bed15a0de596f72a360debc968343cdc3ce (patch) | |
tree | b80be700bfb2b3ee1dd702bc208592e2dab710dd /sys/compat | |
parent | e398922eaf66978b5e556f6b4b095693c865f329 (diff) | |
download | src-cbda8bed15a0de596f72a360debc968343cdc3ce.tar.gz src-cbda8bed15a0de596f72a360debc968343cdc3ce.zip |
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
Diffstat (limited to 'sys/compat')
-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 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; |