From patchwork Sat Dec 3 03:28:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 630643 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1312668pvb; Fri, 2 Dec 2022 19:28:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf4g+hqPHINM85O0EVjdo4GV3AHQG/19flG5JClRY2HCyaNEbB6HzZ8jRE3mI1zKVvpgXmdW X-Received: by 2002:a05:6602:258d:b0:6df:e13:b128 with SMTP id p13-20020a056602258d00b006df0e13b128mr23717417ioo.138.1670038107145; Fri, 02 Dec 2022 19:28:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670038107; cv=none; d=google.com; s=arc-20160816; b=S91+uaRRhnL6o1tKP48f7hn428BEcPbexaJcStgjy8nOBAmydziyQDufGSmNa/JZvA pgiMCZx+Nj9HgvXIQkiJhJBF58bmuYhaPmfJOd7tJniGn4aH5iBO8gWN8Z94jBSFJ8Eo 3GqEqQcgeQic25HEOlkizwge/ZxsEQH2/yJcbSL45osse61HjjpTjvmtnzk80JeEHYSi O5J6s6NQFvUovC1ViFNnQRRP2vfh99zH2TrYuSpKzh9xvD0FLXTKaMQrzaCJ7ZdIuGRH /PjZuqJ9HnCFKCCHv3Xfw+6ypqVOwJhzspovSuC/tVTSHoiWhgre9fedeFi5HS32NfyU Mn0A== 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=4bka/hC+r6G0v99fvQLOYgsT4Apdk+mgo2LcW37kq78=; b=ZyxJ3ipqol26oy45l8WWOnG4yOW0TTRdOdrAzZqhFZ/MDzqVvPO9hai1HMCDWKbEOn tPtgaoStudF1jNdqnF0wtG+6rkjTu2xOTh/6hVZwcC4wVkNob1dn7vQjP1+OmXficlHt m/36rKS+AWENMes42kusAfATbcUV4H4bDBpfriicJy24ldThYvoVHKtqtetA9Tx2iDwX LzAdLEfQkhGdBfeSDMPzKiRNmnXEUzdWsst4gUsk5EPtj3u1azBif4DwubyuDgJvX2lW 7HihuJxMAYLlRt/Ny1BIiclnE0frljTXD2fJJ82VgAbLlpTCWv7+sTbYY8hEUXLl6hOd 9BNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SXoVpUSz; 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 k18-20020a5d97d2000000b006df3e337670si1626645ios.15.2022.12.02.19.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 19:28:27 -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=SXoVpUSz; 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 4A0FD84FF0; Sat, 3 Dec 2022 04:28:23 +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="SXoVpUSz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6BFDC85089; Sat, 3 Dec 2022 04:28:21 +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-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (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 D10A880EB6 for ; Sat, 3 Dec 2022 04:28:18 +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-io1-xd36.google.com with SMTP id d18so4292505iof.6 for ; Fri, 02 Dec 2022 19:28:18 -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=4bka/hC+r6G0v99fvQLOYgsT4Apdk+mgo2LcW37kq78=; b=SXoVpUSzeyZVFIVJltd5dxXk6uws/RpXDP4BHv/dTX50gX10FrGDOEF1B7M9uVjxSN uGnCJMmF3q7p1IWXtRstTOEXXFHNmMS4ZZWu1yU17Zg9sw5U62RzEsgUSahK2CgGi+lg KR2sGFWUiPJVbNVlFmMw4RcxbZik54GGdyszy4caSTQxPoNfLlzP9Trz1gNeUWkpa9hU 5lZqOgi+W6s9yYKd/ulcAnvvZdE5Yb2BlsKpofjiWimTSMuboV6ECOQHwovlSpqSiGF2 J5rnk+txaIVh9rWWt1JeHkOfES+mm8LeTbEPT/Xbr8i3215/0oz9meHAd96U9I3EwplN 8D1A== 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=4bka/hC+r6G0v99fvQLOYgsT4Apdk+mgo2LcW37kq78=; b=4cybPHs6QnXKDzYOmmPRC7exdyx5qaj9GnbfDHEw0RgH9VR5f9lZUOjdypKOJXgKN5 1TV6S/AncOI7XO/pqitlHP2PR+JpLoIG5TomVU9rEAzWJzyW5KJP/H8va8V0oo6ibAAh oqxmJ3NzSwhSX6KUo0xNKIo1bYdKlKy2/1DrscsTJQ6wZWGUApHHE10HcLZthRCryWLl tc/df1Axi5VARm23PtK/K30IXnb+ecaES7+kufiAdP7q5bMr2jbTUnlwbSp8nVJ6u63T ODmP6zixslBj+K0dRAcugXCTQZxl1QTxyuq7JiDbd0iIOMt74CtF4Z6VRhEs4mEe4m7g IT9g== X-Gm-Message-State: ANoB5pn6JmqwV1B88zm0+Hf5JtZMtnaYluz6r+/YmBG6UcMgbusmIQwp tlHh81fuXHpNjGmlqU1slxpWT1ztrhs= X-Received: by 2002:a5d:8902:0:b0:6bc:711:821 with SMTP id b2-20020a5d8902000000b006bc07110821mr34758819ion.192.1670038097045; Fri, 02 Dec 2022 19:28:17 -0800 (PST) Received: from jassi-desktop.. (wnpgmb0311w-ds01-45-179-115.dynamic.bellmts.net. [206.45.179.115]) by smtp.gmail.com with ESMTPSA id f10-20020a056638112a00b0038a308d0f9esm423450jar.39.2022.12.02.19.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Dec 2022 19:28:16 -0800 (PST) From: jassisinghbrar@gmail.com To: u-boot@lists.denx.de Cc: ilias.apalodimas@linaro.org, sughosh.ganu@linaro.org, etienne.carriere@linaro.org, trini@konsulko.com, sjg@chromium.org, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, Jassi Brar Subject: [PATCHv2 5/4] fwu: rename fwu_get_verified_mdata to fwu_get_mdata Date: Fri, 2 Dec 2022 21:28:13 -0600 Message-Id: <20221203032813.580081-1-jassisinghbrar@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221203031557.579632-1-jassisinghbrar@gmail.com> References: <20221203031557.579632-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: Ilias Apalodimas Reviewed-by: Etienne Carriere --- Forgot to send this patch previously in v2 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 3d11d92fb9..77444ba2de 100644 --- a/lib/fwu_updates/fwu.c +++ b/lib/fwu_updates/fwu.c @@ -191,7 +191,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, @@ -199,7 +199,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; @@ -629,7 +629,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;