From patchwork Mon Jan 2 18:27:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 638434 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp942752pvb; Mon, 2 Jan 2023 10:27:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXuHPbB/lEtxHzuiSAX1ivFI1Ivh6Q0qGsVcdoepwqumrADvP6ADAAhQjxBg52mkcYWXaIMA X-Received: by 2002:a05:6808:148d:b0:363:b790:7a95 with SMTP id e13-20020a056808148d00b00363b7907a95mr3433184oiw.10.1672684044900; Mon, 02 Jan 2023 10:27:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672684044; cv=none; d=google.com; s=arc-20160816; b=LlC4HvwDtF3wPojkdV2Vh3DR0sMY/piil4vogvCYuHhgXP33r9t1CRhwXms63dS+PR 1Z2pBE5Sp3t4ZB8Z2+fZJ4x5t4JK4IJcrZ7hHMqDwqp2K5Tk71cAI0dWa9TW3GKJYn4X aJOF8lql5fzAvYKsUGqFlvu/wS+UaBOWR2lp+OL/cpzoMTG7Z+JdJR4wEfV+Dtf44/I+ 2lYTTjbHyRBWYjLP2l0w5vh/BPJR/onxuHfyh+0t8AlxYhVgSi1Aj7ezc7sMlGDjlLQP qIKx14qvP6WZcL5MZBW3GZc3SXb8OpiIt9s8exawO5GP5kTq3zERAceNyz/CZs32j0T3 mmsA== 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=3SotUbs6sgWZcoDoBG+WKDzmTB/KYc7pk+krHvDJd5s=; b=fSLIVZ+LKg8KB1QwYiJPwUcAifB0wsWTcZVZFDynJE5P6W5rNyaAiInGmiVjNysZOn EHa5jTgHm+aSjHn3xXana3qoHAuXQtf1AWZLwhNlMQjvNh6X0QJybeSvoxHXX06op4HD U0V7WUHUSjDEPYT/4gpquNe0RsRjWBL02VtlFhjEOikCG/b3BW1SxwQCRD430hk+q0PZ 6UmEvLzw9Q1xghSGrZrFKwfX7kER6uskKBz++G1FI63GjBhs3ivheOZKnNs5K+eBSJKX ecKWk7RvL1p4V9vWS2sLcx5YRu4caYUbGABlYQZQSLNEW44knotr2Bjy2QX2rfP+DVL2 uvmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N4BHIy9B; 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 bb33-20020a05680816a100b00360d6749defsi25371460oib.251.2023.01.02.10.27.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 10:27:24 -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=N4BHIy9B; 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 7FB4985413; Mon, 2 Jan 2023 19:27:14 +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="N4BHIy9B"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96BCC851E4; Mon, 2 Jan 2023 19:27:12 +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-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 765578554C for ; Mon, 2 Jan 2023 19:27:09 +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-xd31.google.com with SMTP id z126so4570303iof.13 for ; Mon, 02 Jan 2023 10:27:09 -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=3SotUbs6sgWZcoDoBG+WKDzmTB/KYc7pk+krHvDJd5s=; b=N4BHIy9B5UKcH9Ov61GamwYXeoQ7AhZBxV8QWIzEfwjtRBTr+aDSZWaHmwHaIi2ytD GMoKwukmh0nTrBnpsGNwTERZOP0Cz7lIEH+I8VaV1VO903ZEefnRryiPKxqj90YNxjd4 DAPHpxQCFRjb4VAc9ucmyTEufxYmfG0NdwO+u2h4w1MLzn8JP4CsOAqLJkl6OCeKaZlt Q1rtSEkyHr4JKUCq1zyXa61IQz8xiRkwbc+1GMhl8OIxRSU12g++hLEojG0tBLEAwKw9 I8mumpiHQkXSq3zOiLnhCqkF97IfQZI+mAqWtIj3+MQbVINbsINizpLmle/f8ibg6N+y pjvQ== 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=3SotUbs6sgWZcoDoBG+WKDzmTB/KYc7pk+krHvDJd5s=; b=LCbyfOhCkGW/I7DTyT4S9LGfcjnRD1pUtZud+U+BhU4IWnyYt8hP0iY+Ovg7Eb2WiW 2Ai8+pU4jUVi7lLgZMBmAsJ73m18dIzZ9Lz/u+VF4Di3cSDhe+oYFttTi49uTsKb7NsB 8PjFkYroiC+yJKRvCx5+dFhg47ra+IWnS0nz+OwKNPk4+wC2F0fUWsoMYaC0l0tUlOs/ loa/g6QSHqTBUlM9sJ0kpyuj9oPd0hal2mmLNcOXHPObeiLgGcZJ9vXVdSdUCmxv1CMu L5BXLywhf8Zo8D/73VOpgfD6ftgyV0xzGirjwtAA10NHwRxGvIjiDrWSqvvhCMTk5ITw ZuLA== X-Gm-Message-State: AFqh2kqJI9z1JZJXiFKr7bduJIrqJyKYDuWKYqVRK4ywPZFs862MbmW/ URhUMFUojXek3s+nKtANDspr9CQrj9Y= X-Received: by 2002:a6b:b4d1:0:b0:6ed:308f:f807 with SMTP id d200-20020a6bb4d1000000b006ed308ff807mr30239149iof.21.1672684027788; Mon, 02 Jan 2023 10:27:07 -0800 (PST) Received: from jassi-Alienware-x17-R2.. (wnpgmb0311w-ds01-45-179-115.dynamic.bellmts.net. [206.45.179.115]) by smtp.gmail.com with ESMTPSA id o4-20020a02b804000000b0038aaccd3bf3sm9124125jam.39.2023.01.02.10.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Jan 2023 10:27:07 -0800 (PST) From: Jassi Brar X-Google-Original-From: Jassi Brar 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: [PATCHv3 5/5] fwu: rename fwu_get_verified_mdata to fwu_get_mdata Date: Mon, 2 Jan 2023 12:27:04 -0600 Message-Id: <20230102182704.2411290-1-jaswinder.singh@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230102182532.2411125-1-jaswinder.singh@linaro.org> References: <20230102182532.2411125-1-jaswinder.singh@linaro.org> 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 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 234882af9a..75bcc01c13 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; @@ -628,7 +628,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;