From: "Pali Rohár" <pali@kernel.org>
To: "Stefan Roese" <sr@denx.de>, "Marek Behún" <marek.behun@nic.cz>,
"Chris Packham" <judge.packham@gmail.com>
Cc: u-boot@lists.denx.de
Subject: [PATCH u-boot-marvell 01/16] tools: kwbimage: Mark all local functions as static
Date: Tue, 21 Dec 2021 16:54:01 +0100 [thread overview]
Message-ID: <20211221155416.8557-2-pali@kernel.org> (raw)
In-Reply-To: <20211221155416.8557-1-pali@kernel.org>
Mark all local functions as static.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
---
tools/kwbimage.c | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/tools/kwbimage.c b/tools/kwbimage.c
index 875f636c7a4f..9f852923dc61 100644
--- a/tools/kwbimage.c
+++ b/tools/kwbimage.c
@@ -197,7 +197,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;
@@ -208,7 +208,7 @@ int image_boot_mode_id(const char *boot_mode_name)
return -1;
}
-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;
@@ -600,7 +600,8 @@ static int kwb_export_pubkey(RSA *key, struct pubkey_der_v1 *dst, FILE *hashf,
return 0;
}
-int kwb_sign(RSA *key, void *data, int datasz, struct sig_v1 *sig, char *signame)
+static int kwb_sign(RSA *key, void *data, int datasz, struct sig_v1 *sig,
+ char *signame)
{
EVP_PKEY *evp_key;
EVP_MD_CTX *ctx;
@@ -660,8 +661,8 @@ err_key:
return ret;
}
-int kwb_verify(RSA *key, void *data, int datasz, struct sig_v1 *sig,
- char *signame)
+static int kwb_verify(RSA *key, void *data, int datasz, struct sig_v1 *sig,
+ char *signame)
{
EVP_PKEY *evp_key;
EVP_MD_CTX *ctx;
@@ -720,8 +721,8 @@ err_key:
return ret;
}
-int kwb_sign_and_verify(RSA *key, void *data, int datasz, struct sig_v1 *sig,
- char *signame)
+static int kwb_sign_and_verify(RSA *key, void *data, int datasz,
+ struct sig_v1 *sig, char *signame)
{
if (kwb_sign(key, data, datasz, sig, signame) < 0)
return -1;
@@ -733,7 +734,7 @@ int kwb_sign_and_verify(RSA *key, void *data, int datasz, struct sig_v1 *sig,
}
-int kwb_dump_fuse_cmds_38x(FILE *out, struct secure_hdr_v1 *sec_hdr)
+static int kwb_dump_fuse_cmds_38x(FILE *out, struct secure_hdr_v1 *sec_hdr)
{
struct hash_v1 kak_pub_hash;
struct image_cfg_element *e;
@@ -1049,9 +1050,9 @@ static size_t image_headersz_v1(int *hasext)
return image_headersz_align(headersz, image_get_bootfrom());
}
-int add_binary_header_v1(uint8_t **cur, uint8_t **next_ext,
- struct image_cfg_element *binarye,
- struct main_hdr_v1 *main_hdr)
+static int add_binary_header_v1(uint8_t **cur, uint8_t **next_ext,
+ struct image_cfg_element *binarye,
+ struct main_hdr_v1 *main_hdr)
{
struct opt_hdr_v1 *hdr = (struct opt_hdr_v1 *)*cur;
uint32_t add_args;
@@ -1133,7 +1134,7 @@ err_close:
return -1;
}
-int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr)
+static int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr)
{
FILE *hashf;
int res;
@@ -1152,8 +1153,8 @@ int export_pub_kak_hash(RSA *kak, struct secure_hdr_v1 *secure_hdr)
return res < 0 ? 1 : 0;
}
-int kwb_sign_csk_with_kak(struct image_tool_params *params,
- struct secure_hdr_v1 *secure_hdr, RSA *csk)
+static int kwb_sign_csk_with_kak(struct image_tool_params *params,
+ struct secure_hdr_v1 *secure_hdr, RSA *csk)
{
RSA *kak = NULL;
RSA *kak_pub = NULL;
@@ -1194,9 +1195,9 @@ int kwb_sign_csk_with_kak(struct image_tool_params *params,
return 0;
}
-int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr,
- int payloadsz, size_t headersz, uint8_t *image,
- struct secure_hdr_v1 *secure_hdr)
+static int add_secure_header_v1(struct image_tool_params *params, uint8_t *ptr,
+ int payloadsz, size_t headersz, uint8_t *image,
+ struct secure_hdr_v1 *secure_hdr)
{
struct image_cfg_element *e_jtagdelay;
struct image_cfg_element *e_boxid;
@@ -1413,7 +1414,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params,
return image;
}
-int recognize_keyword(char *keyword)
+static int recognize_keyword(char *keyword)
{
int kw_id;
--
2.20.1
next prev parent reply other threads:[~2021-12-21 15:56 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 15:54 [PATCH u-boot-marvell 00/16] tools: kwbimage: Load address fixes Pali Rohár
2021-12-21 15:54 ` Pali Rohár [this message]
2021-12-21 15:54 ` [PATCH u-boot-marvell 02/16] tools: kwbimage: Deduplicate v1 regtype header finishing Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 03/16] tools: kwbimage: Fix generating image with multiple DATA_DELAY commands Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 04/16] tools: kwbimage: Preserve order of BINARY, DATA and " Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 05/16] arm: mvebu: Generate kwbimage.cfg with $(call cmd, ...) Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 06/16] tools: kwbimage: Add support for specifying LOAD_ADDRESS for BINARY command Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 07/16] tools: kwbimage: Check the return value of image_headersz_v1() Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 08/16] arm: mvebu: Correctly set LOAD_ADDRESS for U-Boot SPL binary in kwbimage Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 09/16] arm: mvebu: Enable BootROM output on A38x Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 10/16] tools: kwbimage: Add missing check for maximal value for DATA_DELAY Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 11/16] tools: kwbimage: Show binary image address in mkimage -l, in addition to size Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 12/16] tools: kwbimage: Dump kwbimage config file on '-p -1' option Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 13/16] tools: kwbimage: Do not cast const pointers to non-const pointers Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 14/16] tools: kwbimage/kwboot: Check ext field for non-zero value Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 15/16] tools: kwbimage: Extract main data image without -p arg for dumpimage Pali Rohár
2021-12-21 15:54 ` [PATCH u-boot-marvell 16/16] tools: kwbimage: Fix mkimage/dumpimage -l argument Pali Rohár
2022-01-12 7:26 ` [PATCH u-boot-marvell 00/16] tools: kwbimage: Load address fixes Stefan Roese
2022-01-12 10:41 ` Pali Rohár
2022-01-12 10:55 ` Stefan Roese
2022-01-12 11:06 ` Stefan Roese
2022-01-12 11:34 ` Pali Rohár
2022-01-12 13:53 ` Stefan Roese
2022-01-12 14:16 ` Pali Rohár
2022-01-12 15:06 ` Stefan Roese
2022-01-12 15:09 ` Pali Rohár
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 00/20] " Pali Rohár
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 01/20] tools: kwbimage: Mark all local functions as static Pali Rohár
2022-01-13 6:30 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 02/20] tools: kwbimage: Deduplicate v1 regtype header finishing Pali Rohár
2022-01-13 6:31 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 03/20] tools: kwbimage: Fix generating image with multiple DATA_DELAY commands Pali Rohár
2022-01-13 6:31 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 04/20] tools: kwbimage: Preserve order of BINARY, DATA and " Pali Rohár
2022-01-13 6:32 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 05/20] arm: mvebu: Generate kwbimage.cfg with $(call cmd, ...) Pali Rohár
2022-01-13 6:32 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 06/20] tools: kwbimage: Add support for specifying CPU core Pali Rohár
2022-01-13 6:33 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 07/20] tools: kwbimage: Add support for specifying LOAD_ADDRESS for BINARY command Pali Rohár
2022-01-13 6:35 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 08/20] tools: kwbimage: Check the return value of image_headersz_v1() Pali Rohár
2022-01-13 6:35 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 09/20] tools: kwbimage: Check for maximal kwbimage header size Pali Rohár
2022-01-13 6:38 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 10/20] arm: mvebu: Set CPU for U-Boot SPL binary in kwbimage Pali Rohár
2022-01-13 6:39 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 11/20] arm: mvebu: Correctly set LOAD_ADDRESS " Pali Rohár
2022-01-13 6:40 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 12/20] tools: kwbimage: Enforce 128-bit boundary alignment only for Sheeva CPU Pali Rohár
2022-01-13 6:40 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 13/20] arm: mvebu: Enable BootROM output on A38x Pali Rohár
2022-01-13 6:42 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 14/20] tools: kwbimage: Add missing check for maximal value for DATA_DELAY Pali Rohár
2022-01-13 6:43 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 15/20] tools: kwbimage: Show binary image offset in mkimage -l, in addition to size Pali Rohár
2022-01-13 6:43 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 16/20] tools: kwbimage: Dump kwbimage config file on '-p -1' option Pali Rohár
2022-01-13 6:44 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 17/20] tools: kwbimage: Do not cast const pointers to non-const pointers Pali Rohár
2022-01-13 6:45 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 18/20] tools: kwbimage/kwboot: Check ext field for non-zero value Pali Rohár
2022-01-13 6:46 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 19/20] tools: kwbimage: Extract main data image without -p arg for dumpimage Pali Rohár
2022-01-13 6:46 ` Stefan Roese
2022-01-12 17:20 ` [PATCH u-boot-marvell v2 20/20] tools: kwbimage: Fix mkimage/dumpimage -l argument Pali Rohár
2022-01-13 6:46 ` Stefan Roese
2022-01-14 15:40 ` [PATCH u-boot-marvell v2 00/20] tools: kwbimage: Load address fixes Stefan Roese
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211221155416.8557-2-pali@kernel.org \
--to=pali@kernel.org \
--cc=judge.packham@gmail.com \
--cc=marek.behun@nic.cz \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox