> Date: Wed, 4 Dec 2013 12:53:20 +0100
> From: Joerg Sonnenberger <[email protected]>
> 
> On Wed, Dec 04, 2013 at 12:24:50PM +0100, Mark Kettenis wrote:
> > Sorry, but I disagree with LLVM here.  It shouldn't complain about
> > static inline functions.
> 
> Then mark them as unused, just like you would with a static variable you
> insist on keeping.

Thanks Joerg, that might work.

Brad, does LLVM like the diff below?  Note this changes ohci.c not
uhci.c since I happened to have some uncommtted changes in the latter
that I didn't want to touch.


Index: ohci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ohci.c,v
retrieving revision 1.116
diff -u -p -r1.116 ohci.c
--- ohci.c      9 Nov 2013 08:46:05 -0000       1.116
+++ ohci.c      4 Dec 2013 16:01:42 -0000
@@ -189,21 +189,21 @@ void              ohci_dump_itds(struct ohci_soft_it
 #define OWRITE4(sc, r, x) \
  do { OBARR(sc); bus_space_write_4((sc)->iot, (sc)->ioh, (r), (x)); } while (0)
 
-static __inline u_int8_t
+__unused static __inline u_int8_t
 OREAD1(struct ohci_softc *sc, bus_size_t r)
 {
        OBARR(sc);
        return bus_space_read_1(sc->iot, sc->ioh, r);
 }
 
-static __inline u_int16_t
+__unused static __inline u_int16_t
 OREAD2(struct ohci_softc *sc, bus_size_t r)
 {
        OBARR(sc);
        return bus_space_read_2(sc->iot, sc->ioh, r);
 }
 
-static __inline u_int32_t
+__unused static __inline u_int32_t
 OREAD4(struct ohci_softc *sc, bus_size_t r)
 {
        OBARR(sc);

Reply via email to