Clang warns about static inline functions that aren't used. There are
a couple of those in iwn(4) and wpi(4) that are only used if the debug
code is enabled. The diff below wraps them inside the proper #define.
ok?
Index: dev/pci/if_iwn.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v
retrieving revision 1.179
diff -u -p -r1.179 if_iwn.c
--- dev/pci/if_iwn.c 18 Dec 2016 10:37:42 -0000 1.179
+++ dev/pci/if_iwn.c 23 Dec 2016 17:49:17 -0000
@@ -879,6 +879,8 @@ iwn_mem_write_2(struct iwn_softc *sc, ui
iwn_mem_write(sc, addr & ~3, tmp);
}
+#ifdef IWN_DEBUG
+
static __inline void
iwn_mem_read_region_4(struct iwn_softc *sc, uint32_t addr, uint32_t *data,
int count)
@@ -886,6 +888,8 @@ iwn_mem_read_region_4(struct iwn_softc *
for (; count > 0; count--, addr += 4)
*data++ = iwn_mem_read(sc, addr);
}
+
+#endif
static __inline void
iwn_mem_set_region_4(struct iwn_softc *sc, uint32_t addr, uint32_t val,
Index: dev/pci/if_wpi.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_wpi.c,v
retrieving revision 1.136
diff -u -p -r1.136 if_wpi.c
--- dev/pci/if_wpi.c 5 Oct 2016 21:26:54 -0000 1.136
+++ dev/pci/if_wpi.c 23 Dec 2016 17:49:17 -0000
@@ -494,6 +494,8 @@ wpi_prph_write_region_4(struct wpi_softc
wpi_prph_write(sc, addr, *data);
}
+#ifdef WPI_DEBUG
+
static __inline uint32_t
wpi_mem_read(struct wpi_softc *sc, uint32_t addr)
{
@@ -517,6 +519,8 @@ wpi_mem_read_region_4(struct wpi_softc *
for (; count > 0; count--, addr += 4)
*data++ = wpi_mem_read(sc, addr);
}
+
+#endif
int
wpi_read_prom_data(struct wpi_softc *sc, uint32_t addr, void *data, int count)