2024-01-23 20:09:50

by Geert Uytterhoeven

[permalink] [raw]
Subject: [PATCH] serial: txx9: Add missing #include <asm/txx9/generic.h>

drivers/tty/serial/serial_txx9.c:933:12: error: no previous prototype for ‘early_serial_txx9_setup’ [-Werror=missing-prototypes]
933 | int __init early_serial_txx9_setup(struct uart_port *port)
| ^~~~~~~~~~~~~~~~~~~~~~~

This function is called from arch/mips/txx9/generic/setup.c, and does
have a forward declaration in arch/mips/include/asm/txx9/generic.h.

As the TXX9 serial driver does not support compile-testing, and thus can
only be built on MIPS, fix this by including the MIPS-only header file.

Signed-off-by: Geert Uytterhoeven <[email protected]>
---
Note that the initial version of commit 8720037d55dbfa30 ("serial:
extend compile-test coverage") did enable compile-testing for
SERIAL_TXX9, but that was dropped later, cfr. the discussion in the
thread at
https://lore.kernel.org/all/CAMuHMdXKWDB89Hm-LQcpfTq=0yjm_xvQsQiD4QuEtW=yVymuRw@mail.gmail.com
---
drivers/tty/serial/serial_txx9.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index e1897894a4ef58cb..abba397229581851 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -23,9 +23,10 @@
#include <linux/serial.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
-
#include <linux/io.h>

+#include <asm/txx9/generic.h>
+
#define PASS_LIMIT 256

#if !defined(CONFIG_SERIAL_TXX9_STDSERIAL)
--
2.34.1