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 CC664EB64DD for ; Tue, 25 Jul 2023 21:38:37 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E415C86849; Tue, 25 Jul 2023 23:37:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="N4EO1SX4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9DE378678A; Tue, 25 Jul 2023 23:37:11 +0200 (CEST) Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) (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 8605086771 for ; Tue, 25 Jul 2023 23:36:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-34611de0ee4so26901195ab.0 for ; Tue, 25 Jul 2023 14:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690321011; x=1690925811; 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=k7wpfgj4JsT5V3BEqbL3KANP43QUh/z1NkeS+hPFFDM=; b=N4EO1SX4YFDrcCZc1wWGSDpSIu/uTcL3w8jh3h+KCoG99LkNY+V37+bFaYEzN6tF71 lkyrcASL+LbmyHuBpr9fwkWi6D3NbandfUcUqKmi2/R1ur8rT435yuyu+IeZ7y+rlfiJ qiLURMGpc7FJm+UeTejHrGhO9SxEnhPlsAOQY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690321011; x=1690925811; 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=k7wpfgj4JsT5V3BEqbL3KANP43QUh/z1NkeS+hPFFDM=; b=cBy+AEGLymqnsfjeCRP4RrowF5SrXjp7IH9Zx7dt+cAZGORD0gD7um8AXDxpZU9kGK 4uG3F/4dpEAdldNYcIbrEX1IZeiwpus5nFRUsTEUJeIIgYlx+xT5NGuyLz7CAHSD+djZ HYEFQsvEuxtu7fBzcN7OaH2poe3AJRiFNaHt6Uhsp+YaVbZAsk9A8LfffnXpJMM6CIoK uYgnpcWKxi40iSINHZnP1nIGQEcB4zG4boMMZet84paCGbDF6NDm6PzOcb7e06RBGEfA XkgN0vF9Xh6ktOpg0uCqkMzl3ugKXyV9A+UzH0fLtnhC4agzxng+6hE5xBB2RIL+WQZv 8NTA== X-Gm-Message-State: ABy/qLZVPh4LAqYKHaCyCEGwOzOIKkiu5nYrOzIK6xCn8bJFx9t0/NCN wND1R9jSLVdfhSOlcoYznuvIKAZIOhMYJnpvNRQ= X-Google-Smtp-Source: APBJJlH9V5+g92hfvGXN8V/fbCOjk6n4veUrCukmjD0C0oZ/xV8QhXyp7ef8qpF92hCuO8ppLWZ9Cg== X-Received: by 2002:a05:6e02:156b:b0:347:7399:e9c1 with SMTP id k11-20020a056e02156b00b003477399e9c1mr274440ilu.14.1690321011042; Tue, 25 Jul 2023 14:36:51 -0700 (PDT) Received: from kea.bld.corp.google.com ([2620:15c:183:200:ce78:3dad:1309:8d43]) by smtp.gmail.com with ESMTPSA id ep18-20020a0566384e1200b0042b2d43ee3fsm3891987jab.82.2023.07.25.14.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jul 2023 14:36:50 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Tom Rini , Julius Werner , Dan Handley , Jose Marinho , Simon Glass , Bin Meng , Nikhil M Jain Subject: [PATCH 07/14] bloblist: Drop the spare values Date: Tue, 25 Jul 2023 15:36:19 -0600 Message-ID: <20230725213634.255345-8-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230725213634.255345-1-sjg@chromium.org> References: <20230725213634.255345-1-sjg@chromium.org> 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 There are no spare values in spec v0.9 so drop them. For now they are still present in the headers, with an underscore, so that tests continue to pass. Signed-off-by: Simon Glass --- common/bloblist.c | 1 - include/bloblist.h | 6 ++---- test/bloblist.c | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/common/bloblist.c b/common/bloblist.c index 73f93687015..96b82fe625c 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -154,7 +154,6 @@ static int bloblist_addrec(uint tag, int size, int align_log2, rec->tag = tag; rec->hdr_size = data_start - hdr->alloced; rec->size = size; - rec->spare = 0; /* Zero the record data */ memset((void *)rec + rec_hdr_size(rec), '\0', rec->size); diff --git a/include/bloblist.h b/include/bloblist.h index 0b1aaf3253e..6592ea75403 100644 --- a/include/bloblist.h +++ b/include/bloblist.h @@ -156,7 +156,6 @@ enum bloblist_tag_t { * @alloced: Total size allocated so far for this bloblist. This starts out as * sizeof(bloblist_hdr) since we need at least that much space to store a * valid bloblist - * @spare: Spare space (for future use) * @chksum: CRC32 for the entire bloblist allocated area. Since any of the * blobs can be altered after being created, this checksum is only valid * when the bloblist is finalised before jumping to the next stage of boot. @@ -171,7 +170,7 @@ struct bloblist_hdr { u32 size; u32 alloced; - u32 spare; + u32 _spare; u32 chksum; }; @@ -188,13 +187,12 @@ struct bloblist_hdr { * record's data starts at this offset from the start of the record * @size: Size of record in bytes, excluding the header size. This does not * need to be aligned (e.g. 3 is OK). - * @spare: Spare space for other things */ struct bloblist_rec { u32 tag; u32 hdr_size; u32 size; - u32 spare; + u32 _spare; }; /** diff --git a/test/bloblist.c b/test/bloblist.c index 11bd362a0d5..c2c2c3f3c11 100644 --- a/test/bloblist.c +++ b/test/bloblist.c @@ -202,10 +202,6 @@ static int bloblist_test_checksum(struct unit_test_state *uts) ut_asserteq(-EFBIG, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); hdr->size++; - hdr->spare++; - ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); - hdr->spare--; - hdr->chksum++; ut_asserteq(-EIO, bloblist_check(TEST_ADDR, TEST_BLOBLIST_SIZE)); hdr->chksum--; -- 2.41.0.487.g6d72f3e995-goog