From patchwork Tue Feb 28 00:53:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 657470 Delivered-To: patch@linaro.org Received: by 2002:a05:6504:1b90:b0:222:2e2e:b2c3 with SMTP id e16csp3402212lty; Mon, 27 Feb 2023 16:53:50 -0800 (PST) X-Google-Smtp-Source: AK7set99bFA0CTd/+1sKjD/K34ZGVdOWSCyr1LqKXZETa6PX2o9PzRRdM4Kt8ZYqWDtJo8ZYfCk4 X-Received: by 2002:a05:6a20:a110:b0:cd:47dc:829e with SMTP id q16-20020a056a20a11000b000cd47dc829emr1342436pzk.12.1677545630052; Mon, 27 Feb 2023 16:53:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677545630; cv=none; d=google.com; s=arc-20160816; b=DDgXu/lA/pkKQsKzDjTeSRz2ZYR2ggvwQXWwmR4mYHflPp5pYyUj4aB5SWPb4bo2Y5 SbrDLV2OfYs1SY4YJ4WgxHWTmhXdS0a/jYeHGGx45wHgJNBxfjzDq9W5wWtgsGLw+hBe YBrb464D4XhQFi4u1T4TVdKPMCnRHb2Gn28WBMAP5A62krvaEZ5bFj8nQV+ez8IJnOoi so0rB8nRc3gKPOUnqGgI2DEBONcAJxyDWxQdUGe3l3b4WtdGrWro5EiTulfzwLX4UVMv 2uPEfq2jf0+4SKKueXeYt9MZGEg1UMByYor0oG1Gc6op10ecRqW3V2WXlfnzj1AZHH1c h+CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=P4+8s6J2u6SAViqh55d5+3zeTOc69/bCkXZXxIp0cDw=; b=gQwhtwROOnwhkVcP952jAbx9eaZVrniufPo9w5jZ5+/TMJ/qvyU6BVceN3fsTKf1n3 tcpzJC9zo4kzwgQO4XPVCYmWC3ka9w//UbgLzWYH5XjOEj30L4wFKg8L2Bojmyd+DK36 uh53weKGP1s8hnRvI7LPZudorultOJ0ehBmroNN4hFucRVSCc7K1bByex8dj+dh1aAAE 0MpKT7XEct7V2Fhrx78ydeVR/P3Q9HC5hL2aSF2G01IFVTmqBoY41VDADkv7kxP/ZzvF 9k/6cI3kMKoklp4FQk3cj986HCtHGVwn/UOelV/toWdP1XyZWOr09rxrFrXFtKWiomI7 jRXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NB0VOydz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a21-20020a656415000000b004fbd4ea92c6si8333409pgv.31.2023.02.27.16.53.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 16:53:50 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NB0VOydz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3BA285AC1; Tue, 28 Feb 2023 01:53:10 +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="NB0VOydz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5644A85B84; Tue, 28 Feb 2023 01:53:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) (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 7DC9C85AB1 for ; Tue, 28 Feb 2023 01:53:06 +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=jassisinghbrar@gmail.com Received: by mail-il1-x12a.google.com with SMTP id i4so5435619ils.1 for ; Mon, 27 Feb 2023 16:53:06 -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=P4+8s6J2u6SAViqh55d5+3zeTOc69/bCkXZXxIp0cDw=; b=NB0VOydzMeh6UoTwvEdliGpUwYEKsqoIHE8gJAPf3JmsXiNJRw1Cl/cXVnTsMP7ABu bIlFKtKrDv1eBnUoPnkU06ye+igr7Y9dibXQhsQFqZzN4UTC7oc6+//2GNt1DVt03Rp6 IAf4PB1JUoXCBbMFfQfWSjtNl72qptbLOv8Ug8ASzT4MkH3O0o3WEzeZd7SBOP0JpgBp xZMWeOWQ1bxaxX8sp8roEVZaL1dO9zYm87OO3vdeo1rYRPLjit/tKwQpsddkLUyjcPTQ qV9UId41FfQFZeB8f+Xwt/8cy0dpes2/Ns3D7VFFY9jO2nPFBd9c2pPUaXj1wlIf4YRH asNw== 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=P4+8s6J2u6SAViqh55d5+3zeTOc69/bCkXZXxIp0cDw=; b=kLdoqom5VDuNC6U7yAkwPRWDFerVg9LE+aKoHl5SwspUB1ztbTWG4ygBO1OE75aGu+ NFoyLvWonkbvzvG1705xPiEP4sKeleXMwVb4FppdomUmD8yVHncj+7R8ysSI96Qzhsbi +QixsTVc8ooUZ4vNgc2Q3faarEz8t5zlstuePg+csJSpaih1Wmg+rM6007YO5HV+aRCc vqprQaoTxbVFlUnI+uAXCh5/DQj8+g9jrhkZ5UzPwIb6QGSOC6spFFNK1wrjIZhrJGNk 20+QW90zhxRqctR8NLUQ5wrp3fEYOOhoDNsTe9ybBtWbwVoJXiyVIYeB9M0h5E13oUHT 0k3g== X-Gm-Message-State: AO0yUKUEEjCFLYzAoGLR9yeJwFTVEhvEIjFLqw2nNLBubnsd8d/vN2Da 2UbNj2YLWz50cFSkXE54+CsE5xL+KJY= X-Received: by 2002:a05:6e02:1be4:b0:315:9797:193b with SMTP id y4-20020a056e021be400b003159797193bmr8077667ilv.12.1677545584844; Mon, 27 Feb 2023 16:53:04 -0800 (PST) Received: from jassi-desktop.. (wnpgmb0311w-ds01-45-177-228.dynamic.bellmts.net. [206.45.177.228]) by smtp.gmail.com with ESMTPSA id f22-20020a02a816000000b00346a98b0a76sm2450893jaj.77.2023.02.27.16.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 16:53:04 -0800 (PST) From: jassisinghbrar@gmail.com To: u-boot@lists.denx.de Cc: ilias.apalodimas@linaro.org, etienne.carriere@linaro.org, trini@konsulko.com, sjg@chromium.org, sughosh.ganu@linaro.org, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, Jassi Brar Subject: [PATCH v5 6/6] fwu: rename fwu_get_verified_mdata to fwu_get_mdata Date: Mon, 27 Feb 2023 18:53:01 -0600 Message-Id: <20230228005301.1635889-1-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230228005135.1635726-1-jassisinghbrar@gmail.com> References: <20230228005135.1635726-1-jassisinghbrar@gmail.com> MIME-Version: 1.0 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 From: Jassi Brar fwu_get_mdata() sounds more appropriate than fwu_get_verified_mdata() Signed-off-by: Jassi Brar Reviewed-by: Etienne Carriere Reviewed-by: Ilias Apalodimas --- cmd/fwu_mdata.c | 2 +- include/fwu.h | 4 ++-- lib/fwu_updates/fwu.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/fwu_mdata.c b/cmd/fwu_mdata.c index 9b70340368..5ecda455df 100644 --- a/cmd/fwu_mdata.c +++ b/cmd/fwu_mdata.c @@ -46,7 +46,7 @@ int do_fwu_mdata_read(struct cmd_tbl *cmdtp, int flag, int ret = CMD_RET_SUCCESS, res; struct fwu_mdata mdata; - res = fwu_get_verified_mdata(&mdata); + res = fwu_get_mdata(&mdata); if (res < 0) { log_err("Unable to get valid FWU metadata\n"); ret = CMD_RET_FAILURE; diff --git a/include/fwu.h b/include/fwu.h index 23bd97fe86..ea25aca2cd 100644 --- a/include/fwu.h +++ b/include/fwu.h @@ -80,7 +80,7 @@ int fwu_read_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary); int fwu_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary); /** - * fwu_get_verified_mdata() - Read, verify and return the FWU metadata + * fwu_get_mdata() - Read, verify and return the FWU metadata * * Read both the metadata copies from the storage media, verify their checksum, * and ascertain that both copies match. If one of the copies has gone bad, @@ -88,7 +88,7 @@ int fwu_write_mdata(struct udevice *dev, struct fwu_mdata *mdata, bool primary); * * Return: 0 if OK, -ve on error */ -int fwu_get_verified_mdata(struct fwu_mdata *mdata); +int fwu_get_mdata(struct fwu_mdata *mdata); /** * fwu_get_active_index() - Get active_index from the FWU metadata diff --git a/lib/fwu_updates/fwu.c b/lib/fwu_updates/fwu.c index 14a2af2c74..562aa7df8c 100644 --- a/lib/fwu_updates/fwu.c +++ b/lib/fwu_updates/fwu.c @@ -189,7 +189,7 @@ static inline int mdata_crc_check(struct fwu_mdata *mdata) } /** - * fwu_get_verified_mdata() - Read, verify and return the FWU metadata + * fwu_get_mdata() - Read, verify and return the FWU metadata * * Read both the metadata copies from the storage media, verify their checksum, * and ascertain that both copies match. If one of the copies has gone bad, @@ -197,7 +197,7 @@ static inline int mdata_crc_check(struct fwu_mdata *mdata) * * Return: 0 if OK, -ve on error */ -int fwu_get_verified_mdata(struct fwu_mdata *mdata) +int fwu_get_mdata(struct fwu_mdata *mdata) { int err; bool parts_ok[2] = { false }; @@ -614,7 +614,7 @@ static int fwu_boottime_checks(void *ctx, struct event *event) return ret; } - ret = fwu_get_verified_mdata(NULL); + ret = fwu_get_mdata(NULL); if (ret) { log_debug("Unable to read meta-data\n"); return ret;