arm: Use __diagused for variables only used in KASSERT().

This commit is contained in:
John Baldwin 2022-04-13 16:08:22 -07:00
parent e4746e3fe4
commit 69c595ed7f
4 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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();

View File

@ -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)