Mark octeon_model_get_string() with __init and make internal functions static. Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxxx> --- arch/mips/cavium-octeon/executive/octeon-model.c | 7 ++++--- arch/mips/include/asm/octeon/cvmx.h | 2 -- arch/mips/include/asm/octeon/octeon-model.h | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/octeon-model.c b/arch/mips/cavium-octeon/executive/octeon-model.c index 5105d0d..e15b049 100644 --- a/arch/mips/cavium-octeon/executive/octeon-model.c +++ b/arch/mips/cavium-octeon/executive/octeon-model.c @@ -33,7 +33,7 @@ * * Returns fuse value: 0 or 1 */ -uint8_t cvmx_fuse_read_byte(int byte_addr) +static uint8_t __init cvmx_fuse_read_byte(int byte_addr) { union cvmx_mio_fus_rcmd read_cmd; @@ -52,7 +52,8 @@ uint8_t cvmx_fuse_read_byte(int byte_addr) * as running early in u-boot static/global variables don't work when * running from flash. */ -const char *octeon_model_get_string_buffer(uint32_t chip_id, char *buffer) +static const char *__init octeon_model_get_string_buffer(uint32_t chip_id, + char *buffer) { const char *family; const char *core_model; @@ -422,7 +423,7 @@ const char *octeon_model_get_string_buffer(uint32_t chip_id, char *buffer) * * Returns Model string */ -const char *octeon_model_get_string(uint32_t chip_id) +const char *__init octeon_model_get_string(uint32_t chip_id) { static char buffer[32]; return octeon_model_get_string_buffer(chip_id, buffer); diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h index b0b544f..33db1c8 100644 --- a/arch/mips/include/asm/octeon/cvmx.h +++ b/arch/mips/include/asm/octeon/cvmx.h @@ -451,6 +451,4 @@ static inline uint32_t cvmx_octeon_num_cores(void) return cvmx_pop(ciu_fuse); } -uint8_t cvmx_fuse_read_byte(int byte_addr); - #endif /* __CVMX_H__ */ diff --git a/arch/mips/include/asm/octeon/octeon-model.h b/arch/mips/include/asm/octeon/octeon-model.h index e2c122c..e8a1c2f 100644 --- a/arch/mips/include/asm/octeon/octeon-model.h +++ b/arch/mips/include/asm/octeon/octeon-model.h @@ -326,8 +326,7 @@ static inline int __octeon_is_model_runtime__(uint32_t model) #define OCTEON_IS_COMMON_BINARY() 1 #undef OCTEON_MODEL -const char *octeon_model_get_string(uint32_t chip_id); -const char *octeon_model_get_string_buffer(uint32_t chip_id, char *buffer); +const char *__init octeon_model_get_string(uint32_t chip_id); /* * Return the octeon family, i.e., ProcessorID of the PrID register. -- 2.1.0