flash/nor: remove empty command definitions 20/7120/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Tue, 16 Aug 2022 09:42:32 +0000 (11:42 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 27 Aug 2022 16:18:46 +0000 (16:18 +0000)
The value of struct flash_driver::command can be NULL when the
flash driver does not need to add any new command.

Remove empty command definitions.

Change-Id: I5413967d4069030234469822d24e9825425ae012
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7120
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Tested-by: jenkins
src/flash/nor/fm4.c
src/flash/nor/psoc5lp.c
src/flash/nor/xmc1xxx.c

index 2881f1201fb131df2c3e23218bd1f92ca152feeb..3a362d888ee3e1c29418beacc3a384557639ac59 100644 (file)
@@ -688,24 +688,8 @@ FLASH_BANK_COMMAND_HANDLER(fm4_flash_bank_command)
        return ret;
 }
 
-static const struct command_registration fm4_exec_command_handlers[] = {
-       COMMAND_REGISTRATION_DONE
-};
-
-static const struct command_registration fm4_command_handlers[] = {
-       {
-               .name = "fm4",
-               .mode = COMMAND_ANY,
-               .help = "fm4 flash command group",
-               .usage = "",
-               .chain = fm4_exec_command_handlers,
-       },
-       COMMAND_REGISTRATION_DONE
-};
-
 const struct flash_driver fm4_flash = {
        .name = "fm4",
-       .commands = fm4_command_handlers,
        .flash_bank_command = fm4_flash_bank_command,
        .info = fm4_get_info_command,
        .probe = fm4_probe,
index a8265bc23970cbcb07c4fd946a7fbb2d9c0953bd..b546b0aa0be754fa9e1223d93a288f52e8e27a94 100644 (file)
@@ -811,24 +811,8 @@ FLASH_BANK_COMMAND_HANDLER(psoc5lp_nvl_flash_bank_command)
        return ERROR_OK;
 }
 
-static const struct command_registration psoc5lp_nvl_exec_command_handlers[] = {
-       COMMAND_REGISTRATION_DONE
-};
-
-static const struct command_registration psoc5lp_nvl_command_handlers[] = {
-       {
-               .name = "psoc5lp_nvl",
-               .mode = COMMAND_ANY,
-               .help = "PSoC 5LP NV Latch command group",
-               .usage = "",
-               .chain = psoc5lp_nvl_exec_command_handlers,
-       },
-       COMMAND_REGISTRATION_DONE
-};
-
 const struct flash_driver psoc5lp_nvl_flash = {
        .name = "psoc5lp_nvl",
-       .commands = psoc5lp_nvl_command_handlers,
        .flash_bank_command = psoc5lp_nvl_flash_bank_command,
        .info = psoc5lp_nvl_get_info_command,
        .probe = psoc5lp_nvl_probe,
@@ -1010,24 +994,8 @@ FLASH_BANK_COMMAND_HANDLER(psoc5lp_eeprom_flash_bank_command)
        return ERROR_OK;
 }
 
-static const struct command_registration psoc5lp_eeprom_exec_command_handlers[] = {
-       COMMAND_REGISTRATION_DONE
-};
-
-static const struct command_registration psoc5lp_eeprom_command_handlers[] = {
-       {
-               .name = "psoc5lp_eeprom",
-               .mode = COMMAND_ANY,
-               .help = "PSoC 5LP EEPROM command group",
-               .usage = "",
-               .chain = psoc5lp_eeprom_exec_command_handlers,
-       },
-       COMMAND_REGISTRATION_DONE
-};
-
 const struct flash_driver psoc5lp_eeprom_flash = {
        .name = "psoc5lp_eeprom",
-       .commands = psoc5lp_eeprom_command_handlers,
        .flash_bank_command = psoc5lp_eeprom_flash_bank_command,
        .info = psoc5lp_eeprom_get_info_command,
        .probe = psoc5lp_eeprom_probe,
index 70e07fcfaa06becf32d9228ec8f29051e69999da..04a39f36e179c00a8b149342b2fe50d4e4dee8cd 100644 (file)
@@ -520,24 +520,8 @@ FLASH_BANK_COMMAND_HANDLER(xmc1xxx_flash_bank_command)
        return ERROR_OK;
 }
 
-static const struct command_registration xmc1xxx_exec_command_handlers[] = {
-       COMMAND_REGISTRATION_DONE
-};
-
-static const struct command_registration xmc1xxx_command_handlers[] = {
-       {
-               .name = "xmc1xxx",
-               .mode = COMMAND_ANY,
-               .help = "xmc1xxx flash command group",
-               .usage = "",
-               .chain = xmc1xxx_exec_command_handlers,
-       },
-       COMMAND_REGISTRATION_DONE
-};
-
 const struct flash_driver xmc1xxx_flash = {
        .name = "xmc1xxx",
-       .commands = xmc1xxx_command_handlers,
        .flash_bank_command = xmc1xxx_flash_bank_command,
        .info = xmc1xxx_get_info_command,
        .probe = xmc1xxx_probe,

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)