From patchwork Sun Feb 5 03:02:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 650899 Delivered-To: patch@linaro.org Received: by 2002:a17:522:d8c:b0:4be:c3dc:14d8 with SMTP id d12csp1637451pva; Sat, 4 Feb 2023 19:03:02 -0800 (PST) X-Google-Smtp-Source: AK7set9wiyrSIZ9wdbq8cE9XhbzxoiyDRR8U5qZB80WRavle2E2QnnRap0jhUFKh20cI3m82DadV X-Received: by 2002:a9d:17c5:0:b0:68d:460f:db1a with SMTP id j63-20020a9d17c5000000b0068d460fdb1amr6854661otj.36.1675566182101; Sat, 04 Feb 2023 19:03:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675566182; cv=none; d=google.com; s=arc-20160816; b=nvynh8SoQoPED/8Rlhvyut4NLM0/o1pN+RDtK9L73txvEFaVejyaFxGyT8BFRIeqQb ebi+qxNDyUKSogOeTpvha8oeAoYCIlLeMxL9S2bwzeRyhTqwOkCO8g0eNCGvQYX4l9dA 50cSeks8xulhJG0GhFwHqCmYZ7x+hdJH0EKhcHJwTGylh48hIu9xYC+orRcupyp3XH3a uRRQNeNKBYiKBaJ+g0w6JM+j/80CJ8GeGMc0bq9+C1zmDj2LNOHBE68fm6sPwnfbUxaH PP9iz8elwN1WA8tNdsx4vMAu9FkP21hTD80zrTazMdO7ce8rpnn4VdZOzQSd4MzeyYVy XCmg== 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=F4F/5tLpi11fP2TYIT99+4aUTwZRrkQm3TRAYkx8XPw=; b=B64Z9x4+ulcl9Oi5FC3ocx/lIoSIq/esT4Cs+wAXsnHuwQv/58PEx6k9dVr4BdAJpD V/31Uw4B/p29UA5MzBkYMNyEzcByZ6YDAZ3stPskpIL0grOKFtL0noX353Qrm1UyGHCZ xk8jffQytJbAj9I33tEjp9FU0hq7nLY25GgtiKtdP/GrqX2F5k6+H3voyTvTyy9D8CZu 9OjWxD8pY79MspIoE8X0maOE73IDGZ1r+bqUlZR+yidEt4pmLmXx8FezM+0lk3Eajtan joa5WmfWN27l6NDG3e2F3CJv5pOVpdhVvmV3niiXkD3AZyZBe2nyZUTsrqOHxJmOnzLB TMmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FWs1C91S; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id q24-20020a056830019800b0068bd0c853f8si6590133ota.85.2023.02.04.19.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 19:03:02 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FWs1C91S; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 81D6785918; Sun, 5 Feb 2023 04:02: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=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="FWs1C91S"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5DCC785918; Sun, 5 Feb 2023 04:02:34 +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-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (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 6D40D85922 for ; Sun, 5 Feb 2023 04:02:15 +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-ot1-x334.google.com with SMTP id e21-20020a9d5615000000b006884e5dce99so2425050oti.5 for ; Sat, 04 Feb 2023 19:02:15 -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=F4F/5tLpi11fP2TYIT99+4aUTwZRrkQm3TRAYkx8XPw=; b=FWs1C91SjmLe+XjhxV+T0TzrwETXu1nrueevs5Erg/kR7DVcoxHa7BT7HWVKY1oHbP 8T3cylTkUET0Kk/8yQLuYD6hQaTtQ/cR/uSkFbFntwi9eH2mpaQviiCLbjpXJHUsvrdD ZAJ8RsWzgjbK8xs60PCZNZ2k36KPvhxVoRQ3VsP2to7QbdGv2xosnzP4MBux3pHw4A7Q wGcrHuhgN/A25J5RRi7hnYurjVImq/bE4PlfW4eXJ1DbwATZcg+mRj/2MjcMSMvQGJ68 /LjONV+DUZFHjBZggxRON/bxy8i2l34ZybZunE2N9CvgKhXSuYdZnHGMoy/oAr0tePV5 4I3w== 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=F4F/5tLpi11fP2TYIT99+4aUTwZRrkQm3TRAYkx8XPw=; b=ZaxuiO36h3AH0b2+4rJEH4/ZK+D6jRlzz9EhLyxgRoKStPF3eBhKnAYFJFQaFeCNLY q9FYAzstPTgCyOLP8X7CyWTFqzvbjeBzUBKRnHjbiZj5zYFU/1NLfDWh8sa32HV3HhQ+ rva+QqVCYjzPuQ3sUq3KYhoSU5Uno0SKaEMt7bhoRWiJWHZvMr3QUs1pXJvyEO8E+TW9 rRtnPJ7IMrMSgtKO3tNwd6nfRw4spTmvM1KeHYz5503TDyAXHoeWzkFWRVgBxYNJKhK1 gWZ0C1/SWdZaUk77nBgy7efZZ6TO/cklqCELzRAgOSPtvFCmB9Ioi+UDr/UegJRrO8Jt Gi6g== X-Gm-Message-State: AO0yUKXt0xeSpzjrT6UkBrXD8Vr90f++Qm/c6bJZ1JirDByeimXG2v87 6cBB85/mvpGsYBOwrlb1vr7IxaDPu8Q= X-Received: by 2002:a05:6830:836:b0:68b:e0bc:c533 with SMTP id t22-20020a056830083600b0068be0bcc533mr8439549ots.20.1675566133624; Sat, 04 Feb 2023 19:02:13 -0800 (PST) Received: from jassi-Alienware-x17-R2.. (wnpgmb0311w-ds01-45-177-228.dynamic.bellmts.net. [206.45.177.228]) by smtp.gmail.com with ESMTPSA id e27-20020a0568301e5b00b0068bdfa56717sm2993278otj.36.2023.02.04.19.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Feb 2023 19:02:13 -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: [PATCHv4 5/5] fwu: rename fwu_get_verified_mdata to fwu_get_mdata Date: Sat, 4 Feb 2023 21:02:10 -0600 Message-Id: <20230205030210.61486-1-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230205030056.61345-1-jassisinghbrar@gmail.com> References: <20230205030056.61345-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 9c0a8e2bb1..cf7e0ad078 100644 --- a/lib/fwu_updates/fwu.c +++ b/lib/fwu_updates/fwu.c @@ -182,7 +182,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, @@ -190,7 +190,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 pri_ok, sec_ok; @@ -621,7 +621,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;