flash: declare local symbols as static

Functions and variables that are not used outside the file should
be declared as static.

Change-Id: I52d46ed6d4c9b98a7152eb23274c836416f409a3
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5893
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
Antonio Borneo
2020-10-28 23:27:02 +01:00
parent 5bb0f6befb
commit 21bc36c4d7
9 changed files with 19 additions and 15 deletions

View File

@@ -43,7 +43,7 @@ struct flash_ctrl_priv_data {
char *part_name;
};
const struct flash_ctrl_priv_data flash_priv_data_1 = {
static const struct flash_ctrl_priv_data flash_priv_data_1 = {
.die_id_reg = 0x4090001C,
.jtag_idcode_reg = 0x40900028,
.flash_base = 0x10040000,
@@ -53,7 +53,7 @@ const struct flash_ctrl_priv_data flash_priv_data_1 = {
.part_name = "BLUENRG-1",
};
const struct flash_ctrl_priv_data flash_priv_data_2 = {
static const struct flash_ctrl_priv_data flash_priv_data_2 = {
.die_id_reg = 0x4090001C,
.jtag_idcode_reg = 0x40900028,
.flash_base = 0x10040000,
@@ -63,7 +63,7 @@ const struct flash_ctrl_priv_data flash_priv_data_2 = {
.part_name = "BLUENRG-2",
};
const struct flash_ctrl_priv_data flash_priv_data_lp = {
static const struct flash_ctrl_priv_data flash_priv_data_lp = {
.die_id_reg = 0x40000000,
.jtag_idcode_reg = 0x40000004,
.flash_base = 0x10040000,
@@ -79,7 +79,11 @@ struct bluenrgx_flash_bank {
const struct flash_ctrl_priv_data *flash_ptr;
};
const struct flash_ctrl_priv_data *flash_ctrl[] = {&flash_priv_data_1, &flash_priv_data_2, &flash_priv_data_lp};
static const struct flash_ctrl_priv_data *flash_ctrl[] = {
&flash_priv_data_1,
&flash_priv_data_2,
&flash_priv_data_lp
};
/* flash_bank bluenrg-x 0 0 0 0 <target#> */
FLASH_BANK_COMMAND_HANDLER(bluenrgx_flash_bank_command)