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 42BEFC636D7 for ; Wed, 22 Feb 2023 01:40:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 637FE85A92; Wed, 22 Feb 2023 02:39:25 +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="f2THzaqL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7872585A5B; Wed, 22 Feb 2023 02:38:53 +0100 (CET) Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (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 92C7785A76 for ; Wed, 22 Feb 2023 02:38:48 +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-pj1-x1034.google.com with SMTP id il18-20020a17090b165200b0023127b2d602so6759072pjb.2 for ; Tue, 21 Feb 2023 17:38:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=lNPmYDG03pBjSQgAlu/D/rVJBz39l2PhWGR2ZdRFt4k=; b=f2THzaqLHExe51zWB7LSx/zFifNWVS/P/OCuq03iy6XDvvzPNOrJBbk1V/Doh5Qdjn V3fzpp4sjpWovki7Ha9Npjj/dNfOm7mtYqVx9PrwJ2wbaRcoSZAxWj3at0YLgqsmyzOH u5pSW1kh1VxQ0WB7TTihRcC/ahLScme3UGy8bodOz56wpQ2tR8uF9XR1ikOZjAZccnFL wqIeqgATkU8u9qvpOq6e6ZzMAaXLEM+07SEEdZo1VaFw2QYJJQnQH/mSsZaOeOKkVf8P knjf4CDD5cL3pmS5QmNHVkYgxwd3liLwvJzv0SQBvpZAPMiTg8u2cM4IK3SegBNJG+Ag Uhgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=lNPmYDG03pBjSQgAlu/D/rVJBz39l2PhWGR2ZdRFt4k=; b=6OWIEGqjaoFsV1Jtet454QoWY83u6TGJ6YllIOnijw+HGYVITyTd/D4V5WdMp/35HY ZHHsWAH4mUgX4jeDEP3udNGI9MtzUIApH4KV6DixoYDiRsQVJVPrW4qjAYUFIjVgyISF 7IIbLpMgXo/SMfNUiB/GHIEQ2gVqQx5TsUhiOfA9XIZkSaRWvqVTZUJpHRIbGQh+ISf1 GCRt2jSVFtTUN1FX/acAK7QjL8aZzKxTtPzkG3ulcbnOphhMFi00ubUus7DemgQeyAv3 Ech9XZ/+BHboIeGDRcGGFCqsZzBcaAfef6tv7BKSWCXWcW4YsKMVe9aQPo0zoQCGvMSw HUjQ== X-Gm-Message-State: AO0yUKX1RB8A6GEu3vfQoc/rO1DMRjwvAdfP2qNvEmicgs+bHOksn3co 9Yix+uKYH1Jy+8LKj4z6MRI= X-Google-Smtp-Source: AK7set/ynQVb6LVqc0xH//q6JrBLSHHRq7JVZ7gAgIFN2eNj9ME74B9nvQZT+rcM7PXihp3zxMb1cQ== X-Received: by 2002:a05:6a20:3c8f:b0:bc:b8d:9eab with SMTP id b15-20020a056a203c8f00b000bc0b8d9eabmr17684724pzj.24.1677029926832; Tue, 21 Feb 2023 17:38:46 -0800 (PST) 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 d6-20020aa78e46000000b005accb31201fsm4200976pfr.26.2023.02.21.17.38.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 17:38:46 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Loic Poulain , Marek Vasut , Stefan Roese Subject: [PATCH v1 05/24] lib: sha256: prepare for CONFIG_IS_ENABLED changes Date: Tue, 21 Feb 2023 17:38:02 -0800 Message-Id: <20230222013821.1144691-6-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222013821.1144691-1-troykiskyboundary@gmail.com> References: <20230222013821.1144691-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 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.6 at phobos.denx.de X-Virus-Status: Clean We need to include in order to include files that use CONFIG_IS_ENABLED. TO prepare for that don't pet the watchdog when USE_HOSTCC is defined. Signed-off-by: Troy Kisky --- lib/sha256.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sha256.c b/lib/sha256.c index 4d26aea1c8c..eb31d16f996 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -8,7 +8,11 @@ #ifndef USE_HOSTCC #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else +#include #include #endif /* USE_HOSTCC */ #include @@ -276,7 +280,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 +288,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) { -- 2.34.1