flash: nand: 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;
- don't end line with an open parenthesis;
- expand multiple assignments.

While there, put the 'default' case as last in the list.

Change-Id: I17bf5e88b145ef9b5b188424182f4e54b818eeae
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/9011
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2025-06-28 10:34:00 +02:00
parent d123cfdc58
commit 1042a8d179
3 changed files with 10 additions and 11 deletions

View File

@@ -50,21 +50,22 @@ COMMAND_HANDLER(handle_nand_info_command)
int last = -1;
switch (CMD_ARGC) {
default:
return ERROR_COMMAND_SYNTAX_ERROR;
case 1:
first = 0;
last = INT32_MAX;
break;
case 2:
COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], i);
first = last = i;
first = i;
last = i;
i = 0;
break;
case 3:
COMMAND_PARSE_NUMBER(int, CMD_ARGV[1], first);
COMMAND_PARSE_NUMBER(int, CMD_ARGV[2], last);
break;
default:
return ERROR_COMMAND_SYNTAX_ERROR;
}
struct nand_device *p;