git: 5deab77bb6d1 - main - bce: Fix register dumping to skip blank area
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 02 Feb 2025 16:58:52 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=5deab77bb6d119dd171385d144a622e7ba7108fe
commit 5deab77bb6d119dd171385d144a622e7ba7108fe
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-02-02 16:49:15 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-02-02 16:49:15 +0000
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(-)
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),