From: Claudio Jeker Subject: Re: sparc64: magma: Change cd1400_* declaration to fix compile error on LLVM 16 To: Koakuma , "tech@openbsd.org" Date: Sat, 20 Apr 2024 08:46:58 +0200 On Sat, Apr 20, 2024 at 08:39:03AM +0200, Claudio Jeker wrote: > On Sat, Apr 20, 2024 at 05:49:50AM +0000, Koakuma wrote: > > Bumping the patch, any comments? > > I would use 'static inline' instead of __inline. > Apart from that OK. Will see if miod@ objects else I will commit this > early next week. > Btw. this is what I will commit. -- :wq Claudio Index: magma.c =================================================================== RCS file: /cvs/src/sys/dev/sbus/magma.c,v diff -u -p -r1.35 magma.c --- magma.c 2 Jul 2022 08:50:42 -0000 1.35 +++ magma.c 20 Apr 2024 06:44:49 -0000 @@ -187,8 +187,6 @@ struct cfdriver mbpp_cd = { * * cd1400_compute_baud calculate COR/BPR register values * cd1400_write_ccr write a value to CD1400 ccr - * cd1400_read_reg read from a CD1400 register - * cd1400_write_reg write to a CD1400 register * cd1400_enable_transmitter enable transmitting on CD1400 channel */ @@ -224,11 +222,11 @@ cd1400_compute_baud(speed_t speed, int c /* * 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)) - /*EMPTY*/; + continue; CD1400_WRITE_REG(cd, CD1400_CCR, cmd); } Index: magmareg.h =================================================================== RCS file: /cvs/src/sys/dev/sbus/magmareg.h,v diff -u -p -r1.10 magmareg.h --- magmareg.h 18 Feb 2020 00:12:08 -0000 1.10 +++ magmareg.h 20 Apr 2024 06:42:51 -0000 @@ -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 *);