From 799d9b3d961e2c42b762d2e89a7c01d277f9d3e6 Mon Sep 17 00:00:00 2001 From: claudio Date: Wed, 24 Apr 2024 09:30:30 +0000 Subject: [PATCH] Use static inline for cd1400_write_ccr() because clang 16 has issues with it. Also remove some unused prototypes. From Koakuma, OK kn@ --- sys/dev/sbus/magma.c | 8 +++----- sys/dev/sbus/magmareg.h | 5 +---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index cc6a624c91a..349b67c04cb 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.35 2022/07/02 08:50:42 visa Exp $ */ +/* $OpenBSD: magma.c,v 1.36 2024/04/24 09:30:30 claudio Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -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 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)) - /*EMPTY*/; + continue; CD1400_WRITE_REG(cd, CD1400_CCR, cmd); } diff --git a/sys/dev/sbus/magmareg.h b/sys/dev/sbus/magmareg.h index bec17423d3b..11c07c2b24d 100644 --- a/sys/dev/sbus/magmareg.h +++ b/sys/dev/sbus/magmareg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: magmareg.h,v 1.10 2020/02/18 00:12:08 cheloha Exp $ */ +/* $OpenBSD: magmareg.h,v 1.11 2024/04/24 09:30:30 claudio Exp $ */ /*- * Copyright (c) 1998 Iain Hibbert @@ -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 *); -- 2.20.1