Message ID | 20230313213146.1775650-7-troykiskyboundary@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Lre1Dkcs; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Pb9042qlRz1yWs for <incoming@patchwork.ozlabs.org>; Tue, 14 Mar 2023 08:34:12 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4FBB985DEA; Mon, 13 Mar 2023 22:32:30 +0100 (CET) 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="Lre1Dkcs"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B163B86159; Mon, 13 Mar 2023 22:32:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (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 3783A85DF7 for <u-boot@lists.denx.de>; Mon, 13 Mar 2023 22:32:01 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=troykiskyboundary@gmail.com Received: by mail-pl1-x630.google.com with SMTP id x11so14454851pln.12 for <u-boot@lists.denx.de>; Mon, 13 Mar 2023 14:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jtBP0rpJ+RdfJOb7MyQRuokJPcPHkrQU3B+2xC6eI18=; b=Lre1DkcsOWsiI6vOcCuAMIRvqkUm/L9jGx6Wsa4HxkAMQ8PCwNDxUop4R5i4FtH7nQ ZLOSIoVvkgWJSIIlpnRL5UG6Q8C23b6lBdKAKk0M0DPVzj+oD+Iq6zgWL+8TmFuJ0IkW avgnxO9d47+qeAmdyKVGam0F8cOXtJ0X/JaXSZ2gFZP6clWLfvPvH9JLvB9L2GPCJ6hZ 6cztM2+6xBTsHS3f8jMsDjtcUqKaEIWukrl1g3AOSZLMlK+Lj4fGU1ZqzTE8BaWmuBax 7vKY8fWIJiHCVbmuoO0TGShJI8AsZDqmw+sZeai/r5eXs3kQPqIUaSxtg3oIK0x+uA06 8rqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jtBP0rpJ+RdfJOb7MyQRuokJPcPHkrQU3B+2xC6eI18=; b=nIWC1b16qet6Qi6VnlS6JnYxNlSX9adgphMFoao6zT0l3t8s3RFOh299IEBTj4panq aOaL9ISNP2Hqt5I/CrYrpQKW5Z6Cg4rUzrTy5RsaoLhoFprFP8eV8Ym7qaGDqYv+qJwO xI3osY+yuUuH4zPBZeB14EL8MJLuDEI2wgjiAUZLwoxo2P/z1k3ZhrZXHox5TdC4HGFp AZLv4zQvDAZNXBhcDamZ890dGwb9f2HqXG25c5/2pinZDsA74ETUqanJlSFqKkkdF8Yx xJ7Ct9GXVa0PACEBsM27orj5/x7GAKVTklrb39YQcNdS2ImRbGOEzjSRUPxcipWB75op pEIQ== X-Gm-Message-State: AO0yUKUWcUjqDJmwWY1zkqReOWr2A4qYL/XHIH1gEuX3WC1RESh3vWRt MK9BMHvsAHQ+HAfWQjTOSm8= X-Google-Smtp-Source: AK7set9CoPxuQO5i8X+kZ7C1VlDTwzSCNNmFCWu+Mw/ulVOJ1HyVSn5phZBQWzfpNuvL1t4L+TnH0Q== X-Received: by 2002:a05:6a20:1e5b:b0:cb:9db3:e5e2 with SMTP id cy27-20020a056a201e5b00b000cb9db3e5e2mr29699592pzb.17.1678743119411; Mon, 13 Mar 2023 14:31:59 -0700 (PDT) Received: from OS2.boundarydevices.com. (wsip-184-189-120-117.oc.oc.cox.net. [184.189.120.117]) by smtp.gmail.com with ESMTPSA id s24-20020aa78298000000b005d4360ed2bbsm150797pfm.197.2023.03.13.14.31.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:59 -0700 (PDT) From: Troy Kisky <troykiskyboundary@gmail.com> To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky <troykiskyboundary@gmail.com>, Loic Poulain <loic.poulain@linaro.org>, Marek Vasut <marex@denx.de>, Stefan Roese <sr@denx.de> Subject: [PATCH v3 06/23] lib: sha256: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:28 -0700 Message-Id: <20230313213146.1775650-7-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230313213146.1775650-1-troykiskyboundary@gmail.com> References: <20230313213146.1775650-1-troykiskyboundary@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
CONFIG_IS_ENABLED vs IS_ENABLED
|
expand
|
diff --git a/lib/sha256.c b/lib/sha256.c index 4d26aea1c8c..8e1c3992674 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,6 +8,9 @@ #ifndef USE_HOSTCC #include <common.h> #include <linux/string.h> +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else #include <string.h> #endif /* USE_HOSTCC */ @@ -276,7 +279,7 @@ void sha256_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha256_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end; unsigned char *curr; int chunk; @@ -284,7 +287,7 @@ void sha256_csum_wd(const unsigned char *input, unsigned int ilen, sha256_starts(&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = (unsigned char *)input; end = input + ilen; while (curr < end) {