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 2E2DCC61DA4 for ; Mon, 13 Mar 2023 21:33:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 930C585DF9; Mon, 13 Mar 2023 22:32:21 +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="ME5+dEbe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D61C386146; Mon, 13 Mar 2023 22:32:12 +0100 (CET) Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (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 5DB5985DBC for ; Mon, 13 Mar 2023 22:31:59 +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-pf1-x42e.google.com with SMTP id ce7so8510474pfb.9 for ; Mon, 13 Mar 2023 14:31:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678743117; 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=+EmDsxXwhYQfttTzMniE9YnqVjpK2DRcs0GpX/92HbU=; b=ME5+dEbeIDHjBH/9YxGDA49HuTXFxYOuYWhiJxa0ShK5Eoy+dccIk6bV1P3s3by/F9 cao6zu9UqO35HGKW3NBN7R6PzWVGediE/Q6EpF4EFbvmnlqOFN87wTr8UXHZ/Kt0P7NK r7lCtajG8PK8iUL54Dt7hatNpisKG89gdnGtpABQZ+wc4ZmKiVgUxx/qslTU4dYZerzi EzpCd7zJ7opCop6GjOl04rkdwSEF1dubUHVDEmAFfF6iG1gLwVxgo6SQ9UGd9qytTutV Ycy3VlDv5FO7JxEM/IULsQ+cEpC0X8PqYetmJ4cAVLLFLPB619aY603ydbfYC53G4eWr LKCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678743117; 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=+EmDsxXwhYQfttTzMniE9YnqVjpK2DRcs0GpX/92HbU=; b=dftQkPNUxRlAd/BVp3OnlR7pWAVMCOsn3SwMpir8t7Xvl8isMmGI6RutE/pqgyQ7lq fH8ETJ8AJoFtF1PYh36TnWDd5pHCSnACWAlCD43ztvXHpGNb6uZMTMm+sgiD2MfKSx/l opJoB9Fmdzxh5YVu41LFTt41vtmU62S8SdNwZ+DB9yabntG58acvNmzW6MHi35CecW6J FK9PwowVWwvUIP0edKod67Ew+D2W0opcbLil4z408UOlfKk+KlSqGmlAEZV7CB3lcTMf WopSRDNI2NOftIkStAFqSGzVyPLuEjZszHTCslr0s0loSGxP9tVef73lIjGrfs6sG75Z IoMA== X-Gm-Message-State: AO0yUKX2hEXqP0RtZ/jLCXy97xAK9OiFA4oTrmp+YpL9vvBfjnxEjJbZ 63wPtGgxGJ0U0BU4yks/yrc= X-Google-Smtp-Source: AK7set/Pls3VmAZFsf2n+BzZmRkBMmAQEM/uNiUDyZdgrHaO/r/IdosgAtSQKP9xn/KdYozH9DAxTw== X-Received: by 2002:a62:546:0:b0:5a8:bcf2:125 with SMTP id 67-20020a620546000000b005a8bcf20125mr25353529pff.21.1678743117357; Mon, 13 Mar 2023 14:31:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Mar 2023 14:31:57 -0700 (PDT) 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 v3 04/23] lib: md5: prepare for CONFIG_IS_ENABLED changes Date: Mon, 13 Mar 2023 14:31:26 -0700 Message-Id: <20230313213146.1775650-5-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 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.8 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 --- (no changes since v2) Changes in v2: - delay include of linux/kconfig.h to do from Makefile - as suggested by Simon lib/md5.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/md5.c b/lib/md5.c index 1636ab93661..20d5e87814b 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -29,7 +29,10 @@ #ifndef USE_HOSTCC #include +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) #include +#define PET_WDG +#endif #endif /* USE_HOSTCC */ #include @@ -288,14 +291,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