From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 776E9C433EF for ; Thu, 13 Jan 2022 06:30:51 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4F110831D3; Thu, 13 Jan 2022 07:30:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1642055449; bh=QB5w04ggvcheMN1an1j/6GIqwyf5oGkA9+UEZXPTYdw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DArULj8diuaKGry4Gf8n9czCgl0Eovd1iOPNVv963m0hxAOJ2Y29eUkI1Hm8oWRZB c9w6DtljUsqxCEBP/TZP7j8KcTU7KGXtZj9wmse1b0AA0DkCaVJ+Lu6EOl3I7ZxFDs vdn+SBEs9k/0ZAMzuuR0OzPeKw8J4PgRFt+4ydEAuL3QfF5Q6kT44Ac3vNm5mLh6tL GVDH0S9B0k0sGOH3EVLftx36EEbxxvFqoT9xs2SGsITaOSbhwrBZFzLY639PP2n44o Ap7HDLUyjVteKJy7PkiQqHa9z7D1OOFmYAgvfUiXeouZBbZ3zQ35qP5h3ybROEV/vL 00Eq8auq/b5CQ== Received: by phobos.denx.de (Postfix, from userid 109) id 0B55783264; Thu, 13 Jan 2022 07:30:47 +0100 (CET) Received: from mout-u-204.mailbox.org (mout-u-204.mailbox.org [91.198.250.253]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 85A1C82F89 for ; Thu, 13 Jan 2022 07:30:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp202.mailbox.org (unknown [91.198.250.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4JZF1J19W8zQlGr; Thu, 13 Jan 2022 07:30:44 +0100 (CET) Message-ID: <74bff890-cbf6-ca67-4173-814d23356398@denx.de> Date: Thu, 13 Jan 2022 07:30:39 +0100 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell v2 01/20] tools: kwbimage: Mark all local functions as static Content-Language: en-US To: =?UTF-8?Q?Pali_Roh=c3=a1r?= , =?UTF-8?Q?Marek_Beh=c3=ban?= , Chris Packham Cc: u-boot@lists.denx.de References: <20211221155416.8557-1-pali@kernel.org> <20220112172054.5961-1-pali@kernel.org> <20220112172054.5961-2-pali@kernel.org> From: Stefan Roese In-Reply-To: <20220112172054.5961-2-pali@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 1/12/22 18:20, Pali Rohár wrote: > Mark all local functions as static. > > Signed-off-by: Pali Rohár > Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwbimage.c | 37 +++++++++++++++++++------------------ > 1 file changed, 19 insertions(+), 18 deletions(-) > > diff --git a/tools/kwbimage.c b/tools/kwbimage.c > index 224d8156be19..b0598cab4bc7 100644 > --- a/tools/kwbimage.c > +++ b/tools/kwbimage.c > @@ -199,7 +199,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; > > @@ -210,7 +210,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; > > @@ -602,7 +602,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; > @@ -662,8 +663,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; > @@ -722,8 +723,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; > @@ -735,7 +736,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; > @@ -1051,9 +1052,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; > @@ -1135,7 +1136,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; > @@ -1154,8 +1155,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; > @@ -1196,9 +1197,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; > @@ -1415,7 +1416,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; > > Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de