Index | Thread | Search

From:
Koakuma <koachan@protonmail.com>
Subject:
sparc64: magma: Change cd1400_* declaration to fix compile error on LLVM 16
To:
"tech@openbsd.org" <tech@openbsd.org>
Date:
Fri, 08 Mar 2024 12:57:19 +0000

Download raw body.

Thread
It seems that LLVM 16 doesn't like the way cd1400_* is declared, so
I changed it a little to make the kernel build with it.

This does make it build properly but I am not really sure if this is the right
way to do it. Any comments?

diff --git sys/dev/sbus/magma.c sys/dev/sbus/magma.c
index cc6a624c91a..72803ef9ca0 100644
--- sys/dev/sbus/magma.c
+++ sys/dev/sbus/magma.c
@@ -224,7 +224,7 @@ cd1400_compute_baud(speed_t speed, int clock, int *cor, int *bpr)
 /*
  * Write a CD1400 channel command, should have a timeout?
  */
-__inline void
+static __inline void
 cd1400_write_ccr(struct cd1400 *cd, u_char cmd)
 {
        while (CD1400_READ_REG(cd, CD1400_CCR))
diff --git sys/dev/sbus/magmareg.h sys/dev/sbus/magmareg.h
index bec17423d3b..d6aa01d6644 100644
--- sys/dev/sbus/magmareg.h
+++ sys/dev/sbus/magmareg.h
@@ -197,9 +197,6 @@ struct mbpp_softc {
 /* internal function prototypes */
 
 int cd1400_compute_baud(speed_t, int, int *, int *);
-__inline void cd1400_write_ccr(struct cd1400 *, u_char);
-__inline u_char cd1400_read_reg(struct cd1400 *, int);
-__inline void cd1400_write_reg(struct cd1400 *, int, u_char);
 void cd1400_enable_transmitter(struct cd1400 *, int);
 
 int magma_match(struct device *, void *, void *);