git: 69c595ed7f49 - main - arm: Use __diagused for variables only used in KASSERT().

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 13 Apr 2022 23:09:47 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=69c595ed7f492dce8274fde6ed1cc3301a6ddb3c

commit 69c595ed7f492dce8274fde6ed1cc3301a6ddb3c
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-04-13 23:08:22 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-04-13 23:08:22 +0000

    arm: Use __diagused for variables only used in KASSERT().
---
 sys/arm/broadcom/bcm2835/bcm2835_sdhci.c | 2 +-
 sys/arm/freescale/imx/imx_iomux.c        | 6 +++---
 sys/arm/mv/gpio.c                        | 2 +-
 sys/arm/ti/cpsw/if_cpsw.c                | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
index 8225abcb624c..1ff7a2d189ba 100644
--- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
@@ -577,7 +577,7 @@ bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc)
 {
 	struct sdhci_slot *slot;
 	vm_paddr_t pdst, psrc;
-	int err, idx, len, sync_op, width;
+	int err __diagused, idx, len, sync_op, width;
 
 	slot = &sc->sc_slot;
 	mtx_assert(&slot->mtx, MA_OWNED);
diff --git a/sys/arm/freescale/imx/imx_iomux.c b/sys/arm/freescale/imx/imx_iomux.c
index f8c7d8e785a6..bae89f80902f 100644
--- a/sys/arm/freescale/imx/imx_iomux.c
+++ b/sys/arm/freescale/imx/imx_iomux.c
@@ -264,7 +264,7 @@ iomux_attach(device_t dev)
 uint32_t
 imx_iomux_gpr_get(u_int regaddr)
 {
-	struct iomux_softc * sc;
+	struct iomux_softc *sc __diagused;
 
 	sc = iomux_sc;
 	KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__));
@@ -278,7 +278,7 @@ imx_iomux_gpr_get(u_int regaddr)
 void
 imx_iomux_gpr_set(u_int regaddr, uint32_t val)
 {
-	struct iomux_softc * sc;
+	struct iomux_softc *sc __diagused;
 
 	sc = iomux_sc;
 	KASSERT(sc != NULL, ("%s called before attach", __FUNCTION__));
@@ -292,7 +292,7 @@ imx_iomux_gpr_set(u_int regaddr, uint32_t val)
 void
 imx_iomux_gpr_set_masked(u_int regaddr, uint32_t clrbits, uint32_t setbits)
 {
-	struct iomux_softc * sc;
+	struct iomux_softc *sc __diagused;
 	uint32_t val;
 
 	sc = iomux_sc;
diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c
index 7fd80cb7c3d7..c8f5a8c2aaf3 100644
--- a/sys/arm/mv/gpio.c
+++ b/sys/arm/mv/gpio.c
@@ -605,7 +605,7 @@ static void
 mv_gpio_double_edge_init(device_t dev, int pin)
 {
 	uint8_t raw_read;
-	struct mv_gpio_softc *sc;
+	struct mv_gpio_softc *sc __unused;
 	sc = (struct mv_gpio_softc *)device_get_softc(dev);
 
 	MV_GPIO_ASSERT_LOCKED();
diff --git a/sys/arm/ti/cpsw/if_cpsw.c b/sys/arm/ti/cpsw/if_cpsw.c
index ebf5644883f7..9403bdef4012 100644
--- a/sys/arm/ti/cpsw/if_cpsw.c
+++ b/sys/arm/ti/cpsw/if_cpsw.c
@@ -530,7 +530,7 @@ cpsw_add_slots(struct cpsw_softc *sc, struct cpsw_queue *queue, int requested)
 static void
 cpsw_free_slot(struct cpsw_softc *sc, struct cpsw_slot *slot)
 {
-	int error;
+	int error __diagused;
 
 	if (slot->dmamap) {
 		if (slot->mbuf)