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 0B673C636D7 for ; Wed, 22 Feb 2023 01:39:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 25E8D85A87; Wed, 22 Feb 2023 02:39:19 +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="g8+7x1TB"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CF04E859DD; Wed, 22 Feb 2023 02:38:51 +0100 (CET) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 70C2D85A6E for ; Wed, 22 Feb 2023 02:38:47 +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-pg1-x530.google.com with SMTP id y19so3457789pgk.5 for ; Tue, 21 Feb 2023 17:38:47 -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=S/J+6bCScgwRA4Vw+w14tj/HDQ8qkpPrF5B2bAlRkT4=; b=g8+7x1TBJq+IArOVYyk2DbFZZJNP0TZGd+PraL2H40l6iOBnWFQIuOCL1NqCA7wXPt kWmEW9HsesfmPbxLPabVPY3T8fE7w8rXPVX1GbEESV7HrMVOo1TVD96nNsNtNkTpzmIh TUDkIlCIDHobmLC/TxxwmWha5aqUFKBsKRPMbBFJZcxy8V+Wsl18h86h7DejUgWV8H4U pIzhYx0z5fYKbcYxjtSpNJlIU7UWHpZux6K8VpPaAmrYXn5kP0SRws337bXt8xy0jPda dS8EXmWmAgYrrUNrQgQHX+xTpx1ZsNVnhiQLp50MEjSGFgLFLj9lDKIqPKWvlBnyw9ny NKPQ== 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=S/J+6bCScgwRA4Vw+w14tj/HDQ8qkpPrF5B2bAlRkT4=; b=oaTIi1Ubu6e929jXbE0S63juX9lN9oJvis9T0QXRSbcbmYYND/zrgMDp8rwPipjwZi c1cVp+owISthjOA5s3wOdtnrG61svSCpST/9yR6aVrXpRyYYrnjUkY8QvjuKvZCMsago 5iNj5GqAOwEzLz8zkAiFvrQbuBm1dTkR8mz9kpZjA2k4SJZKy12C2Fy6LO8fTDcpfG/1 Fqjfswq114DWShO/FVQQDxSViKcLZrOg1WPatSf31p+2qFoBcnZfLhl9YCs+YBo0dkNS 226D/e+W/wqFGF+coLo7quTmMsHCBgX0xWkk7klkvv0Itn1qC0lQFrHc1bDYYjqYB/CM iR7w== X-Gm-Message-State: AO0yUKVWgeOIx4GJtrpLkOuHVvJE0Lb82bvh1PzrBTxOyTOYTFieTTQQ XYVZqT1SuSqer2IK7jiAkSE8pGrcxBup3A== X-Google-Smtp-Source: AK7set86zvey02M81jrIfQPFKZY9c6eESn0w/emfXtv7effH1kKlrYKZZB7+deqZIez6Q3+VZFoglg== X-Received: by 2002:aa7:98c3:0:b0:5a8:4ba7:5840 with SMTP id e3-20020aa798c3000000b005a84ba75840mr5380200pfm.26.1677029925829; Tue, 21 Feb 2023 17:38:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 17:38:45 -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 04/24] lib: sha1: prepare for CONFIG_IS_ENABLED changes Date: Tue, 21 Feb 2023 17:38:01 -0800 Message-Id: <20230222013821.1144691-5-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/sha1.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/sha1.c b/lib/sha1.c index 8d074078934..af49535e5d2 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -19,7 +19,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 @@ -328,14 +332,14 @@ void sha1_csum_wd(const unsigned char *input, unsigned int ilen, unsigned char *output, unsigned int chunk_sz) { sha1_context ctx; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end, *curr; int chunk; #endif sha1_starts (&ctx); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = input; end = input + ilen; while (curr < end) { -- 2.34.1