target: prepare for aligning switch and case statements

To prepare for aligning switch and case statements, fix in advance
some checkpatch error due to existing code:
- remove useless parenthesis;
- remove useless 'break';
- join spit lines;
- add space around operators;
- remove 'else' after exit() and return.

Change-Id: I8a87a0ea104205d087dcb8cbf4c67ff13a47742f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9050
Tested-by: jenkins
Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
Antonio Borneo
2025-07-26 13:41:04 +02:00
parent 6b7cc918f0
commit e9561c4af5
8 changed files with 82 additions and 100 deletions
+2 -4
View File
@@ -1208,15 +1208,13 @@ static int set_watchpoint(struct target *t, struct watchpoint *wp)
switch (wp->rw) {
case WPT_WRITE:
if (set_debug_regs(t, wp->address, wp_num,
DR7_BP_WRITE, wp->length) != ERROR_OK) {
DR7_BP_WRITE, wp->length) != ERROR_OK)
return ERROR_FAIL;
}
break;
case WPT_ACCESS:
if (set_debug_regs(t, wp->address, wp_num, DR7_BP_READWRITE,
wp->length) != ERROR_OK) {
wp->length) != ERROR_OK)
return ERROR_FAIL;
}
break;
default:
LOG_ERROR("%s only 'access' or 'write' watchpoints are supported", __func__);