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

View File

@@ -2329,9 +2329,9 @@ int arm7_9_write_memory(struct target *target,
/* fast memory writes are only safe when the target is running
* from a sufficiently high clock (32 kHz is usually too slow)
*/
if (arm7_9->fast_memory_access)
if (arm7_9->fast_memory_access) {
retval = arm7_9_execute_fast_sys_speed(target);
else {
} else {
retval = arm7_9_execute_sys_speed(target);
/*
@@ -2373,9 +2373,9 @@ int arm7_9_write_memory(struct target *target,
/* fast memory writes are only safe when the target is running
* from a sufficiently high clock (32 kHz is usually too slow)
*/
if (arm7_9->fast_memory_access)
if (arm7_9->fast_memory_access) {
retval = arm7_9_execute_fast_sys_speed(target);
else {
} else {
retval = arm7_9_execute_sys_speed(target);
/*
@@ -2416,9 +2416,9 @@ int arm7_9_write_memory(struct target *target,
/* fast memory writes are only safe when the target is running
* from a sufficiently high clock (32 kHz is usually too slow)
*/
if (arm7_9->fast_memory_access)
if (arm7_9->fast_memory_access) {
retval = arm7_9_execute_fast_sys_speed(target);
else {
} else {
retval = arm7_9_execute_sys_speed(target);
/*