nor: move in driver.h the flash_driver's declaration
The static analyser 'sparse' complains, while compiling a nor driver, that the struct flash_driver is declared in the file as non static, but it is not exposed through an include file. The message is: warning: symbol 'XXX' was not declared. Should it be static? Move the list of flash_driver's declaration in driver.h Fix some incorrect non-const declaration and remove redundant forward declarations. Change-Id: I5e41d094307aac4a57dfa9a70496ff3cf180bd92 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7662 Tested-by: jenkins
This commit is contained in:
@@ -183,7 +183,7 @@ static const struct command_registration swm050_command_handlers[] = {
|
||||
COMMAND_REGISTRATION_DONE
|
||||
};
|
||||
|
||||
struct flash_driver swm050_flash = {
|
||||
const struct flash_driver swm050_flash = {
|
||||
.name = "swm050",
|
||||
.commands = swm050_command_handlers,
|
||||
.flash_bank_command = swm050_flash_bank_command,
|
||||
|
||||
Reference in New Issue
Block a user