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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75D4AC12002 for ; Wed, 14 Jul 2021 22:08:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id F24DB613C2 for ; Wed, 14 Jul 2021 22:08:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F24DB613C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6AF2B82F1D; Thu, 15 Jul 2021 00:07:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sFlWFPFh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BE0C480214; Thu, 15 Jul 2021 00:06:18 +0200 (CEST) Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id F1BB181D1F for ; Thu, 15 Jul 2021 00:06:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-ot1-x332.google.com with SMTP id 42-20020a9d012d0000b02904b98d90c82cso4106663otu.5 for ; Wed, 14 Jul 2021 15:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LNJBmTFNHMQfrcOouSovNXaF7PhHwBFJlEjpOiTtlLo=; b=sFlWFPFhgMI2aR/LN5YqlloLjriIIFanjUaExEgHVHyFjPT5v1lSnf7SmDD0tCqxOH Y1AkRokQh0wHXiA4RmTZXnOEbDBKKjk11/BPk+o010mXH33PlE9N6pyyVOG2E5PiZ9sb PTELd+QU7ilYlJpia1if2PYmBhuml7UriGiOnb5BT8MWRZHdMgc7MsArpvrVgCMLff7/ z56+X4eCSTkokbnfA2P90YGzrtV6P123cdbL3eUInr0UQOCN7/LuYYfC/inr/J+DyJKY WQIUy0bFea/kjV4/fwKPdXXtE34YA7mPtYYBUGTwNYv1WVgond/afOUcUHkj5ecMheU+ JGTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LNJBmTFNHMQfrcOouSovNXaF7PhHwBFJlEjpOiTtlLo=; b=gMDBtz2y7FkDVq+1MOBZRYDYwSu7mx/My+BMx6KLZGnc83l9KMQSBPtTmc+maxSV6Q fEJhAsHvtmza2Ro7Jyeji7y+jsZczBpgeVLLVcD/DA3tgo8vt6rQoRFo7gIsTOacl5o0 wb4hBN3DIuRdsT9EO20ER6Yx4NNW+tK6EMxeODpEQLh8en3rSuhhAVUYL0RXlm76H7Hb dbRCgojJdqIpL5i6l4HRHsXDCK/Y+P96m1Oly7wF3iMl8U4Ei8rFi5IsOZDffCyP8/O3 PxTdqpAQKrfBl/QtZNSsx9txXdY5V8QqI0Z2TGZfUf3cly9jhb1shL9Wn/lY4Yad9cu0 gQKA== X-Gm-Message-State: AOAM531qWBjrAsiii19IbthGa805KF8nzkWeE6WBWULUd6IkCIPphtuJ 8J7q3dwEHu/9T14643x5acyJwZuqN0I= X-Google-Smtp-Source: ABdhPJyDllRjHJTnSkMKxYKHO2QqNL2t0CkxEpGfSFZVLAZxjbLqzkKJNh/MM+7Fm1OimsJ+R1sPog== X-Received: by 2002:a9d:708a:: with SMTP id l10mr290280otj.300.1626300364257; Wed, 14 Jul 2021 15:06:04 -0700 (PDT) Received: from nuclearis3.lan (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id w64sm687278otb.45.2021.07.14.15.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 15:06:03 -0700 (PDT) From: Alexandru Gagniuc To: u-boot@lists.denx.de, trini@konsulko.com Cc: Alexandru Gagniuc , Simon Glass Subject: [PATCH v3 13/19] image: image-sig.c: Remove crypto_algos array Date: Wed, 14 Jul 2021 17:05:41 -0500 Message-Id: <20210714220547.170371-14-mr.nuke.me@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210714211138.GA25256@bill-the-cat> References: <20210714211138.GA25256@bill-the-cat> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 Crytographic algorithms (currently RSA), are stored in linker lists. The crypto_algos array is unused, so remove it, and any logic associated with it. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass --- common/image-sig.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/common/image-sig.c b/common/image-sig.c index d996b7ba50..d680bf7d98 100644 --- a/common/image-sig.c +++ b/common/image-sig.c @@ -51,10 +51,6 @@ struct checksum_algo checksum_algos[] = { }; -struct crypto_algo crypto_algos[] = { - { -}; - struct padding_algo padding_algos[] = { { .name = "pkcs-1.5", @@ -99,32 +95,14 @@ struct checksum_algo *image_get_checksum_algo(const char *full_name) struct crypto_algo *image_get_crypto_algo(const char *full_name) { struct crypto_algo *crypto, *end; - int i; const char *name; -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - static bool done; - - if (!done) { - done = true; - for (i = 0; i < ARRAY_SIZE(crypto_algos); i++) { - crypto_algos[i].name += gd->reloc_off; - crypto_algos[i].verify += gd->reloc_off; - } - } -#endif - /* Move name to after the comma */ name = strchr(full_name, ','); if (!name) return NULL; name += 1; - for (i = 0; i < ARRAY_SIZE(crypto_algos); i++) { - if (!strcmp(crypto_algos[i].name, name)) - return &crypto_algos[i]; - } - crypto = ll_entry_start(struct crypto_algo, cryptos); end = ll_entry_end(struct crypto_algo, cryptos); for (; crypto < end; crypto++) { -- 2.31.1