forked from auracaster/openocd
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:
@@ -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__);
|
||||
|
||||
Reference in New Issue
Block a user