[Skiboot] [PATCH] treewide: squash sparse static warnings

Andrew Donnellan andrew.donnellan at au1.ibm.com
Tue Jan 3 17:10:55 AEDT 2017


Add static to various declarations that can use it, as found by sparse.

It turns out that one of these (fsp_pcie_inv_lock in
platform/ibm-fsp/firenze.c) is actually unused, so remove it.

Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
---
 core/nvram-format.c         | 2 +-
 hw/ipmi/ipmi-attn.c         | 2 +-
 hw/prd.c                    | 2 +-
 platforms/astbmc/p8dtu.c    | 2 +-
 platforms/ibm-fsp/firenze.c | 2 --
 5 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/core/nvram-format.c b/core/nvram-format.c
index b110d804..5c7c9fe3 100644
--- a/core/nvram-format.c
+++ b/core/nvram-format.c
@@ -28,7 +28,7 @@ struct chrp_nvram_hdr {
 	char		name[12];
 };
 
-struct chrp_nvram_hdr *skiboot_part_hdr;
+static struct chrp_nvram_hdr *skiboot_part_hdr;
 
 #define NVRAM_SIG_FW_PRIV	0x51
 #define NVRAM_SIG_SYSTEM	0x70
diff --git a/hw/ipmi/ipmi-attn.c b/hw/ipmi/ipmi-attn.c
index a3e48786..ef7153ed 100644
--- a/hw/ipmi/ipmi-attn.c
+++ b/hw/ipmi/ipmi-attn.c
@@ -33,7 +33,7 @@ DEFINE_LOG_ENTRY(OPAL_RC_ATTN, OPAL_PLATFORM_ERR_EVT,
 static char ti_buffer[IPMI_TI_BUFFER_SIZE];
 
 #define STACK_BUF_ENTRIES       20
-struct bt_entry bt_buf[STACK_BUF_ENTRIES];
+static struct bt_entry bt_buf[STACK_BUF_ENTRIES];
 
 /* Log eSEL event with OPAL backtrace */
 static void ipmi_log_terminate_event(const char *msg)
diff --git a/hw/prd.c b/hw/prd.c
index e520e13d..a44faa9b 100644
--- a/hw/prd.c
+++ b/hw/prd.c
@@ -33,7 +33,7 @@ static uint8_t events[MAX_CHIPS];
 static uint64_t ipoll_status[MAX_CHIPS];
 static struct opal_prd_msg prd_msg;
 static bool prd_msg_inuse, prd_active;
-struct dt_node *prd_node;
+static struct dt_node *prd_node;
 
 /* Locking:
  *
diff --git a/platforms/astbmc/p8dtu.c b/platforms/astbmc/p8dtu.c
index 8d7f92f0..63d36fb6 100644
--- a/platforms/astbmc/p8dtu.c
+++ b/platforms/astbmc/p8dtu.c
@@ -227,7 +227,7 @@ static bool p8dtu2u_probe(void)
 	return true;
 }
 
-const struct bmc_platform astbmc_smc = {
+static const struct bmc_platform astbmc_smc = {
 	.name = "SMC",
 	.ipmi_oem_partial_add_esel   = IPMI_CODE(0x3a, 0xf0),
 	.ipmi_oem_pnor_access_status = IPMI_CODE(0x3a, 0x07),
diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c
index cc626c04..dc705466 100644
--- a/platforms/ibm-fsp/firenze.c
+++ b/platforms/ibm-fsp/firenze.c
@@ -28,8 +28,6 @@
 #include "ibm-fsp.h"
 #include "lxvpd.h"
 
-struct lock fsp_pcie_inv_lock = LOCK_UNLOCKED;
-
 static struct dt_node *dt_create_i2c_master(struct dt_node *n, uint32_t eng_id)
 {
 	struct dt_node *i2cm;
-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan at au1.ibm.com  IBM Australia Limited



More information about the Skiboot mailing list