summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2016-12-23 18:44:51 +0000
committerkettenis <kettenis@openbsd.org>2016-12-23 18:44:51 +0000
commitce577f447e9e1bcfb74486429dbb8dbdb9d27b08 (patch)
tree7344de35c904b9e9f68022e4f7cc17cc0568d3e4
parentsync (diff)
downloadwireguard-openbsd-ce577f447e9e1bcfb74486429dbb8dbdb9d27b08.tar.xz
wireguard-openbsd-ce577f447e9e1bcfb74486429dbb8dbdb9d27b08.zip
Hide static inline functions that are only used in debug code behind the same
#ifdef as the debug code itself. Prevents clang from warning about these functions being unused. ok stsp@, deraadt@
-rw-r--r--sys/dev/pci/if_iwn.c6
-rw-r--r--sys/dev/pci/if_wpi.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index ed749947b79..16096e5722e 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.179 2016/12/18 10:37:42 stsp Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.180 2016/12/23 18:44:51 kettenis Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -879,6 +879,8 @@ iwn_mem_write_2(struct iwn_softc *sc, uint32_t addr, uint16_t data)
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)
@@ -887,6 +889,8 @@ iwn_mem_read_region_4(struct iwn_softc *sc, uint32_t addr, uint32_t *data,
*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,
int count)
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index ee2c24c9c54..1dc0404c17f 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.136 2016/10/05 21:26:54 stsp Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.137 2016/12/23 18:44:51 kettenis Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -494,6 +494,8 @@ wpi_prph_write_region_4(struct wpi_softc *sc, uint32_t addr,
wpi_prph_write(sc, addr, *data);
}
+#ifdef WPI_DEBUG
+
static __inline uint32_t
wpi_mem_read(struct wpi_softc *sc, uint32_t addr)
{
@@ -518,6 +520,8 @@ wpi_mem_read_region_4(struct wpi_softc *sc, uint32_t addr, uint32_t *data,
*data++ = wpi_mem_read(sc, addr);
}
+#endif
+
int
wpi_read_prom_data(struct wpi_softc *sc, uint32_t addr, void *data, int count)
{