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:
@@ -520,7 +520,7 @@ FLASH_BANK_COMMAND_HANDLER(rp2040_flash_bank_command)
|
||||
return ERROR_OK;
|
||||
}
|
||||
|
||||
struct flash_driver rp2040_flash = {
|
||||
const struct flash_driver rp2040_flash = {
|
||||
.name = "rp2040_flash",
|
||||
.flash_bank_command = rp2040_flash_bank_command,
|
||||
.erase = rp2040_flash_erase,
|
||||
|
||||
Reference in New Issue
Block a user