diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-15 08:05:27 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-09-15 14:24:28 +0200 |
commit | 65ca0db25b6aca3df1ff0adf1a9469e83983614f (patch) | |
tree | dd743a80db71939108f1ebf32dca9d8d86b511ad /scripts | |
parent | 3b39a4d550ac3756a6a9fb520a92f6f62c1b6b45 (diff) | |
download | barebox-65ca0db25b6aca3df1ff0adf1a9469e83983614f.tar.gz barebox-65ca0db25b6aca3df1ff0adf1a9469e83983614f.tar.xz |
scripts: Make locally used functions static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/imx/imx-usb-loader.c | 2 | ||||
-rw-r--r-- | scripts/kwbimage.c | 4 | ||||
-rw-r--r-- | scripts/mkublheader.c | 2 | ||||
-rw-r--r-- | scripts/mxsimage.c | 2 | ||||
-rw-r--r-- | scripts/omap4_usbboot.c | 14 | ||||
-rw-r--r-- | scripts/pblimage.c | 2 | ||||
-rw-r--r-- | scripts/socfpga_mkimage.c | 2 | ||||
-rw-r--r-- | scripts/tegra/t114/nvbctlib_t114.c | 12 | ||||
-rw-r--r-- | scripts/tegra/t124/nvbctlib_t124.c | 12 | ||||
-rw-r--r-- | scripts/tegra/t20/nvbctlib_t20.c | 12 | ||||
-rw-r--r-- | scripts/tegra/t30/nvbctlib_t30.c | 12 |
11 files changed, 38 insertions, 38 deletions
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index 8447ca2a8f..28f342633d 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/imx/imx-usb-loader.c @@ -562,7 +562,7 @@ static int transfer(int report, unsigned char *p, unsigned cnt, int *last_trans) return err; } -int do_status(void) +static int do_status(void) { int last_trans; unsigned char tmp[64]; diff --git a/scripts/kwbimage.c b/scripts/kwbimage.c index 6ba4abaa30..26eb07fa81 100644 --- a/scripts/kwbimage.c +++ b/scripts/kwbimage.c @@ -231,7 +231,7 @@ static const char *image_boot_mode_name(unsigned int id) return NULL; } -int image_boot_mode_id(const char *boot_mode_name) +static int image_boot_mode_id(const char *boot_mode_name) { int i; for (i = 0; boot_modes[i].name; i++) @@ -250,7 +250,7 @@ static const char *image_nand_ecc_mode_name(unsigned int id) return NULL; } -int image_nand_ecc_mode_id(const char *nand_ecc_mode_name) +static int image_nand_ecc_mode_id(const char *nand_ecc_mode_name) { int i; for (i = 0; nand_ecc_modes[i].name; i++) diff --git a/scripts/mkublheader.c b/scripts/mkublheader.c index 5464a80611..496ba0b500 100644 --- a/scripts/mkublheader.c +++ b/scripts/mkublheader.c @@ -45,7 +45,7 @@ struct ubl_header uint32_t ldAddr; /* Address where image is copied to */ }; -void usage(char *prgname) +static void usage(char *prgname) { printf( "Usage : %s [OPTION] FILE > HEADER\n" "\n" diff --git a/scripts/mxsimage.c b/scripts/mxsimage.c index 8a63d76939..aa25440862 100644 --- a/scripts/mxsimage.c +++ b/scripts/mxsimage.c @@ -442,7 +442,7 @@ int EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *ctx) } #endif -uint32_t pbl_crc32(uint32_t in_crc, const char *buf, uint32_t len) +static uint32_t pbl_crc32(uint32_t in_crc, const char *buf, uint32_t len) { uint32_t crc32_val; int i; diff --git a/scripts/omap4_usbboot.c b/scripts/omap4_usbboot.c index 329668d1dd..44236259dc 100644 --- a/scripts/omap4_usbboot.c +++ b/scripts/omap4_usbboot.c @@ -43,21 +43,21 @@ #define host_print(fmt, arg...) printf(HFORMAT fmt TFORMAT, \ HOST_FORMAT, ##arg, TARGET_FORMAT) -int usb_write(void *h, void const *data, int len) +static int usb_write(void *h, void const *data, int len) { int actual; return libusb_bulk_transfer(h, 0x01, (void *)data, len, &actual, 5000) ? 0 : actual; } -int usb_read(void *h, void *data, int len) +static int usb_read(void *h, void *data, int len) { int actual; return libusb_bulk_transfer(h, 0x81, data, len, &actual, 5000) ? 0 : actual; } -void panic(struct termios *t_restore) +static void panic(struct termios *t_restore) { tcsetattr(STDIN_FILENO, TCSANOW, t_restore); printf(HFORMAT, HOST_FORMAT); @@ -70,7 +70,7 @@ struct thread_vars { struct termios t_restore; }; -void *listenerTask(void *argument) +static void *listenerTask(void *argument) { struct thread_vars *vars = argument; int c; @@ -88,7 +88,7 @@ void *listenerTask(void *argument) return NULL; } -int read_asic_id(struct libusb_device_handle *usb) +static int read_asic_id(struct libusb_device_handle *usb) { #define LINEWIDTH 16 const uint32_t msg_getid = 0xF0030003; @@ -189,7 +189,7 @@ struct file_data { void *data; }; -int process_file(struct libusb_device_handle *usb, const char *rootfs, +static int process_file(struct libusb_device_handle *usb, const char *rootfs, struct file_data *fd_vector, struct termios *t_restore) { uint32_t i, j, pos, size; @@ -339,7 +339,7 @@ open_ok: return ret; } -int usb_boot(struct libusb_device_handle *usb, +static int usb_boot(struct libusb_device_handle *usb, void *data, unsigned sz, const char *rootfs) { const uint32_t msg_boot = 0xF0030002; diff --git a/scripts/pblimage.c b/scripts/pblimage.c index 235af8aa11..3c3625cdd5 100644 --- a/scripts/pblimage.c +++ b/scripts/pblimage.c @@ -100,7 +100,7 @@ static void make_crc_table(void) crc_table_valid = 1; } -uint32_t pbl_crc32(uint32_t in_crc, const char *buf, uint32_t len) +static uint32_t pbl_crc32(uint32_t in_crc, const char *buf, uint32_t len) { uint32_t crc32_val; int i; diff --git a/scripts/socfpga_mkimage.c b/scripts/socfpga_mkimage.c index 03150cce8d..73dfbeae3a 100644 --- a/scripts/socfpga_mkimage.c +++ b/scripts/socfpga_mkimage.c @@ -147,7 +147,7 @@ static const uint32_t crc_table[256] = { 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 }; -uint32_t crc32(uint32_t crc, void *_buf, int length) +static uint32_t crc32(uint32_t crc, void *_buf, int length) { uint8_t *buf = _buf; diff --git a/scripts/tegra/t114/nvbctlib_t114.c b/scripts/tegra/t114/nvbctlib_t114.c index 063882a905..3bda785f57 100644 --- a/scripts/tegra/t114/nvbctlib_t114.c +++ b/scripts/tegra/t114/nvbctlib_t114.c @@ -827,7 +827,7 @@ t114_set_sdram_param(build_image_context *context, return 0; } -int +static int t114_getbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -862,7 +862,7 @@ t114_getbl_param(u_int32_t set, return 0; } -int +static int t114_setbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -897,7 +897,7 @@ t114_setbl_param(u_int32_t set, return 0; } -int +static int t114_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -981,7 +981,7 @@ t114_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) return 0; } -int +static int t114_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -1009,7 +1009,7 @@ t114_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) return 0; } -int +static int t114_bct_set_data(parse_token id, u_int8_t *data, u_int32_t length, @@ -1034,7 +1034,7 @@ t114_bct_set_data(parse_token id, return 0; } -void t114_init_bad_block_table(build_image_context *context) +static void t114_init_bad_block_table(build_image_context *context) { u_int32_t bytes_per_entry; nvboot_badblock_table *table; diff --git a/scripts/tegra/t124/nvbctlib_t124.c b/scripts/tegra/t124/nvbctlib_t124.c index ab2d925570..55b840926e 100644 --- a/scripts/tegra/t124/nvbctlib_t124.c +++ b/scripts/tegra/t124/nvbctlib_t124.c @@ -828,7 +828,7 @@ t124_set_sdram_param(build_image_context *context, return 0; } -int +static int t124_getbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -863,7 +863,7 @@ t124_getbl_param(u_int32_t set, return 0; } -int +static int t124_setbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -898,7 +898,7 @@ t124_setbl_param(u_int32_t set, return 0; } -int +static int t124_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -982,7 +982,7 @@ t124_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) return 0; } -int +static int t124_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -1010,7 +1010,7 @@ t124_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) return 0; } -int +static int t124_bct_set_data(parse_token id, u_int8_t *data, u_int32_t length, @@ -1036,7 +1036,7 @@ t124_bct_set_data(parse_token id, return 0; } -void t124_init_bad_block_table(build_image_context *context) +static void t124_init_bad_block_table(build_image_context *context) { u_int32_t bytes_per_entry; nvboot_badblock_table *table; diff --git a/scripts/tegra/t20/nvbctlib_t20.c b/scripts/tegra/t20/nvbctlib_t20.c index 5386b285d6..42ad146755 100644 --- a/scripts/tegra/t20/nvbctlib_t20.c +++ b/scripts/tegra/t20/nvbctlib_t20.c @@ -416,7 +416,7 @@ t20_get_sdram_param(build_image_context *context, return 0; } -int +static int t20_getbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -451,7 +451,7 @@ t20_getbl_param(u_int32_t set, return 0; } -int +static int t20_setbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -486,7 +486,7 @@ t20_setbl_param(u_int32_t set, return 0; } -int +static int t20_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -565,7 +565,7 @@ t20_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) return 0; } -int +static int t20_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -593,7 +593,7 @@ t20_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) return 0; } -int +static int t20_bct_set_data(parse_token id, u_int8_t *data, u_int32_t length, @@ -615,7 +615,7 @@ t20_bct_set_data(parse_token id, return 0; } -void t20_init_bad_block_table(build_image_context *context) +static void t20_init_bad_block_table(build_image_context *context) { u_int32_t bytes_per_entry; nvboot_badblock_table *table; diff --git a/scripts/tegra/t30/nvbctlib_t30.c b/scripts/tegra/t30/nvbctlib_t30.c index e55b0dfb98..04e8974fbf 100644 --- a/scripts/tegra/t30/nvbctlib_t30.c +++ b/scripts/tegra/t30/nvbctlib_t30.c @@ -623,7 +623,7 @@ t30_set_sdram_param(build_image_context *context, return 0; } -int +static int t30_getbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -658,7 +658,7 @@ t30_getbl_param(u_int32_t set, return 0; } -int +static int t30_setbl_param(u_int32_t set, parse_token id, u_int32_t *data, @@ -693,7 +693,7 @@ t30_setbl_param(u_int32_t set, return 0; } -int +static int t30_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -772,7 +772,7 @@ t30_bct_get_value(parse_token id, u_int32_t *data, u_int8_t *bct) return 0; } -int +static int t30_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) { nvboot_config_table *bct_ptr = (nvboot_config_table *)bct; @@ -800,7 +800,7 @@ t30_bct_set_value(parse_token id, u_int32_t data, u_int8_t *bct) return 0; } -int +static int t30_bct_set_data(parse_token id, u_int8_t *data, u_int32_t length, @@ -822,7 +822,7 @@ t30_bct_set_data(parse_token id, return 0; } -void t30_init_bad_block_table(build_image_context *context) +static void t30_init_bad_block_table(build_image_context *context) { u_int32_t bytes_per_entry; nvboot_badblock_table *table; |