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
This commit is contained in:
Hans Petter Selasky 2022-09-20 22:36:08 +02:00
parent e398922eaf
commit cbda8bed15
2 changed files with 7 additions and 4 deletions

View File

@ -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)

View File

@ -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;