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 23113C636D7 for ; Wed, 22 Feb 2023 01:39:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C0FD3859FF; Wed, 22 Feb 2023 02:38:55 +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="PiOy8UGl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3BC0985A6B; Wed, 22 Feb 2023 02:38:50 +0100 (CET) Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (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 6009885A67 for ; Wed, 22 Feb 2023 02:38:46 +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-x52a.google.com with SMTP id d6so75481pgu.2 for ; Tue, 21 Feb 2023 17:38:46 -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=l3r0hbPLQaRGJVyMW+inLpoGur3ALmblUDTe/YlajzQ=; b=PiOy8UGl/CRoThz7m17oueAw/ya6W48Hvk/SVvNMYp4JvYulGaEMGlBGnGBE7RunVI nzsP2ztNCNRJtQJic1wOYhoVIPmaWpuqzcy2S8btPIbn87G9/KtFsR9DMzZdvL07daUk 16QZMhSOCP74CrOursdqhgY5asd6qwPXduPwe1iaZmfmMFDTkNZdtQbeOl/wCHspecC5 Cnq9f8aJ3pCNVvrcBNDg5l54lZUuuNQvpIkWT5UUuh7qJpIvzgTPCpa/sPbBT5aWNvwr 2s2K5Si3NcTxAyMwNtVTfpEX0g24fRf+Y1SLmeZHCTaZ6m5/gi7SHfowapNSH8l6gXbq ETdA== 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=l3r0hbPLQaRGJVyMW+inLpoGur3ALmblUDTe/YlajzQ=; b=NX7p4J9dd5/W4SvV1HjQFXGBeaBqd1l2ZGYM9tz9Kd2H97Ao6uAGpB1V44KmxmhUSt Jlmp8j/w237OoHx0IKu6y6Sx2WkFUAPD2WzpD9NgDLE0k7GWAcOU+QUmXPcCQpC7JqA9 JssV9sCxtvdEqMGhH+tTV8xHb6Zrbrl9Z9j+0J3XVCZ20otphr057YZNeLrvsKbeMzO+ YFEP+xLi3UC1DBkXiLBnXKwIeL4D1vKuOHdWYlejJvnFWP/7RvnR1o3R9nfo6hAnIbzX ocj5NbmwNwCza/C0oKxZRxPXCSOXAddEhHLOQIiBIiDDeaDXKZBkDyB+NndRv0XAs84p Wzdg== X-Gm-Message-State: AO0yUKVQxyvq3F5DnByut7E68+LlJOm5jdYS7fXaBSHdGUg1ohzJEpAz 19AEpFm6P+B2nl+lK5DI06DP64j6F7RPtw== X-Google-Smtp-Source: AK7set+2qMwabPTNXWlfgDjXSFboZVMLw5prRr1TVK7F1NMUbBJfpNg0U7e+0KLXbcXAddR+0tX04g== X-Received: by 2002:aa7:96c9:0:b0:5a8:bed9:3509 with SMTP id h9-20020aa796c9000000b005a8bed93509mr6054504pfq.3.1677029924813; Tue, 21 Feb 2023 17:38:44 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 17:38:44 -0800 (PST) From: Troy Kisky To: sjg@chromium.org, trini@konsulko.com, u-boot@lists.denx.de Cc: gary.bisson@lairdconnect.com, Troy Kisky , Marek Vasut , Stefan Roese Subject: [PATCH v1 03/24] lib: md5: prepare for CONFIG_IS_ENABLED changes Date: Tue, 21 Feb 2023 17:38:00 -0800 Message-Id: <20230222013821.1144691-4-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/md5.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/md5.c b/lib/md5.c index 1636ab93661..bd3d8fa9b2b 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -29,7 +29,12 @@ #ifndef USE_HOSTCC #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) #include +#define PET_WDG +#endif +#else +#include #endif /* USE_HOSTCC */ #include @@ -288,14 +293,14 @@ md5_wd(const unsigned char *input, unsigned int len, unsigned char output[16], unsigned int chunk_sz) { struct MD5Context context; -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG const unsigned char *end, *curr; int chunk; #endif MD5Init(&context); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#ifdef PET_WDG curr = input; end = input + len; while (curr < end) { -- 2.34.1