> Date: Tue, 3 Dec 2013 17:55:00 -0500
> From: Brad Smith <[email protected]>
>
> Put UREAD4 under #ifdef UHCI_DEBUG as it is only used by a function
> for debugging which is also under UHCI_DEBUG.
>
> uhci.c:256:1: error: unused function 'UREAD4' [-Werror,-Wunused-function]
>
> OK?
Sorry, but I disagree with LLVM here. It shouldn't complain about
static inline functions. I think it makes sense to have a complete
set of access APIs. And #ifdef'ing the unused ones out will
ultimately cause bitrot that we don't want.
I suspect the root cause of the problems is the GNU/ISO inline fuckup,
which means nobody can remember exactly what the semantics of
inline/static inline/extern inline is. Perhaps we need to look at it
again now that we don't have gcc2 in the tree anymore.
For the same reasone I don't like similar changes like the ohci.c and
if_wpi.c ones.
> Index: uhci.c
> ===================================================================
> RCS file: /home/cvs/src/sys/dev/usb/uhci.c,v
> retrieving revision 1.104
> diff -u -p -r1.104 uhci.c
> --- uhci.c 9 Nov 2013 08:46:05 -0000 1.104
> +++ uhci.c 3 Dec 2013 22:50:28 -0000
> @@ -252,12 +252,14 @@ UREAD2(struct uhci_softc *sc, bus_size_t
> return bus_space_read_2(sc->iot, sc->ioh, r);
> }
>
> +#ifdef UHCI_DEBUG
> static __inline u_int32_t
> UREAD4(struct uhci_softc *sc, bus_size_t r)
> {
> UBARR(sc);
> return bus_space_read_4(sc->iot, sc->ioh, r);
> }
> +#endif
>
> #define UHCICMD(sc, cmd) UWRITE2(sc, UHCI_CMD, cmd)
> #define UHCISTS(sc) UREAD2(sc, UHCI_STS)