all: Make file-scope variables internally linked where applicable (#57)

Narrows the scope of visible symbols to where they're actually used. Also
makes it easier to see true globals in source files
(ones used from multiple translation units)
This commit is contained in:
Mat M 2018-02-26 03:42:21 -05:00 committed by SciresM
parent c94cfe4898
commit 1de6b336bb
8 changed files with 17 additions and 18 deletions

View file

@ -62,7 +62,7 @@ typedef struct {
uint32_t num_handlers;
} smc_table_t;
smc_table_entry_t g_smc_user_table[SMC_USER_HANDLERS] = {
static smc_table_entry_t g_smc_user_table[SMC_USER_HANDLERS] = {
{0, NULL},
{0xC3000401, smc_set_config},
{0xC3000002, smc_get_config},
@ -84,7 +84,7 @@ smc_table_entry_t g_smc_user_table[SMC_USER_HANDLERS] = {
{0xC3000012, smc_unwrap_aes_wrapped_titlekey}
};
smc_table_entry_t g_smc_priv_table[SMC_PRIV_HANDLERS] = {
static smc_table_entry_t g_smc_priv_table[SMC_PRIV_HANDLERS] = {
{0, NULL},
{0xC4000001, smc_cpu_suspend},
{0x84000002, smc_cpu_off},
@ -96,7 +96,7 @@ smc_table_entry_t g_smc_priv_table[SMC_PRIV_HANDLERS] = {
{0xC3000008, smc_read_write_register}
};
smc_table_t g_smc_tables[2] = {
static smc_table_t g_smc_tables[2] = {
{ /* SMC_HANDLER_USER */
g_smc_user_table,
SMC_USER_HANDLERS