openocd: don't test 'debug_level' directly

Use the macro 'LOG_LEVEL_IS()' to test 'debug_level'.

While there, use the macro 'LOG_LVL_*' in place of the numeric
value.

Skip all riscv code, as it is going to be updated soon from the
external fork.

Change-Id: Icad7e879e040d3b9cf1cc004c433f28725017493
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9070
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2025-08-04 17:42:22 +02:00
parent 3fd9759415
commit 557a2082b1
12 changed files with 18 additions and 18 deletions

View File

@@ -400,7 +400,7 @@ static int xscale_read_tx(struct target *target, int consume)
}
if (!((!(field0_in & 1)) && consume))
goto done;
if (debug_level >= 3) {
if (LOG_LEVEL_IS(LOG_LVL_DEBUG)) {
LOG_DEBUG("waiting 100ms");
alive_sleep(100); /* avoid flooding the logs */
} else
@@ -471,7 +471,7 @@ static int xscale_write_rx(struct target *target)
}
if (!(field0_in & 1))
goto done;
if (debug_level >= 3) {
if (LOG_LEVEL_IS(LOG_LVL_DEBUG)) {
LOG_DEBUG("waiting 100ms");
alive_sleep(100); /* avoid flooding the logs */
} else