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 AD1CEC7EE23 for ; Fri, 24 Feb 2023 18:12:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA99985B8B; Fri, 24 Feb 2023 19:12: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="IF6NlK3l"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DD22F85BA8; Fri, 24 Feb 2023 19:11:09 +0100 (CET) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (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 3A99885B8C for ; Fri, 24 Feb 2023 19:11:04 +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-x102a.google.com with SMTP id c23so12421881pjo.4 for ; Fri, 24 Feb 2023 10:11:04 -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=O1f17ggLE7i2yaKRcNFwVpEM9b9KhdXO8Y3UNPh1NAo=; b=IF6NlK3lWRufwjpP1QRKxEDPCIsKr4mSf1A3hkKKuonMsURciJzlkqHGNdYDfUyelW ZH0yowS8b8Zr0XPV3aLuj1hdAFA0hUv9BRoQN2l6IpMtO9e/A9naYb/sp1xmky89K6o+ 23isWr1HCQlP86xWwwdaAUaBabf+OKMsjUVhqDRRdnpj4/ETDaINiZ/EyPLIPwg2NQm/ Ko1d8zxVqkol29vL+VYXjWyaP0/K4vTm5+dTfYYOwrYujO7CkSukSgcodiFcVJD08yq0 E0zQG/q0ArkJo5BhHijjjSyjLNOUrA0b6bhSRABENUzNSPJ8evSVUGq085FP7+2DoKpY 048A== 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=O1f17ggLE7i2yaKRcNFwVpEM9b9KhdXO8Y3UNPh1NAo=; b=yl4mcqvS5iTIKIukzf/Ju67b4forW8E1GfrU04YWAQoQQy/2jIutLz45KIPJxeWyu6 V0dtDzNQrmjrjlooN8aQbYWnIkv9SiLxt7anao9HxwUqv7du4jeV6ksjOBzw/cdgGNCK SfvzsDHOVl9FLfZYm2FWR7OIGrvX0nsp/HlBu9Hmw0S/Dv1uBLHEnOPSyJbwZlEHoRsg z1hFh9DYeBrm65qiNFjkwHtkEzQSzk91XxMsaG6Q73KMhMMPE6Vy7ZpJc95RtoCDNO9R nVp5TPFSvwW97kGqHuGLb/WUWC2wQiyis6frUn+U/u3pRT4zWcEPDXeEkEnBFKzGJulv uaag== X-Gm-Message-State: AO0yUKUP7ORsdmMXsjwmhjdfSWwu99WzghGnuD5oF5YzHSNowkOLslOn RBP7oinEEzlmVCawMASR53M= X-Google-Smtp-Source: AK7set/linyQJaSEAQD4STPx4EDQOeppVtCf+ri8jibHyHmuVkgcxc0iHTOg3EebricLHgib3AwFdA== X-Received: by 2002:a17:903:68b:b0:19a:a650:ac4f with SMTP id ki11-20020a170903068b00b0019aa650ac4fmr14901042plb.46.1677262263774; Fri, 24 Feb 2023 10:11:03 -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 o1-20020a170902bcc100b0019c922911a2sm7513957pls.40.2023.02.24.10.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Feb 2023 10:11:03 -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 v2 05/26] lib: sha1: prepare for CONFIG_IS_ENABLED changes Date: Fri, 24 Feb 2023 10:10:26 -0800 Message-Id: <20230224181047.2775829-6-troykiskyboundary@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230224181047.2775829-1-troykiskyboundary@gmail.com> References: <20230224181047.2775829-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 Reviewed-by: Simon Glass --- Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/sha1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/sha1.c b/lib/sha1.c index 8d074078934..cd5d7aead8d 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -19,6 +19,9 @@ #ifndef USE_HOSTCC #include #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#define PET_WDG +#endif #else #include #endif /* USE_HOSTCC */ @@ -328,14 +331,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