From 5deab77bb6d119dd171385d144a622e7ba7108fe Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Sun, 2 Feb 2025 09:49:15 -0700 Subject: bce: Fix register dumping to skip blank area When compiling with debug enabled, this produces an always false warning. It's clear that this was to skip ranges that aren't used when dumping the registers, so change the && to || to skip things properly. PR: 200984 Sponsored by: Netflix --- sys/dev/bce/if_bce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/bce') diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c index 73af49015e52..b0ba56099135 100644 --- a/sys/dev/bce/if_bce.c +++ b/sys/dev/bce/if_bce.c @@ -11082,7 +11082,7 @@ bce_dump_rxp_state(struct bce_softc *sc, int regs) for (int i = BCE_RXP_CPU_MODE; i < 0xe8fff; i += 0x10) { /* Skip the big blank sapces */ - if (i < 0xc5400 && i > 0xdffff) + if (i < 0xc5400 || i > 0xdffff) BCE_PRINTF("0x%04X: 0x%08X 0x%08X " "0x%08X 0x%08X\n", i, REG_RD_IND(sc, i), @@ -11200,7 +11200,7 @@ bce_dump_cp_state(struct bce_softc *sc, int regs) for (int i = BCE_CP_CPU_MODE; i < 0x1aa000; i += 0x10) { /* Skip the big blank spaces */ - if (i < 0x185400 && i > 0x19ffff) + if (i < 0x185400 || i > 0x19ffff) BCE_PRINTF("0x%04X: 0x%08X 0x%08X " "0x%08X 0x%08X\n", i, REG_RD_IND(sc, i), -- cgit v1.3