From mboxrd@z Thu Jan 1 00:00:00 1970 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 8037AC433EF for ; Mon, 17 Jan 2022 15:06:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 540EB837D2; Mon, 17 Jan 2022 16:05:47 +0100 (CET) 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="h3iakhBn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C945A82C6D; Mon, 17 Jan 2022 16:05:22 +0100 (CET) Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) (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 4CD9A837E6 for ; Mon, 17 Jan 2022 16:04:59 +0100 (CET) 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-io1-xd32.google.com with SMTP id v1so21773152ioj.10 for ; Mon, 17 Jan 2022 07:04:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G4Qc7lbw1Xep7/Jde8REwzxd2uPAanLDme1jpeHJc+I=; b=h3iakhBnUSHN08bbFxZvMD/pimQqtkpl++alNpuN1ZQsC3CexUMemgzRFomQq95GLw z5RvMtOT6t2+zs2xQtU8u80cC7CBrFFxyA6vui0MTdVGoNR6fztWfa6L4Pcay1T/+Jr6 X3bUU69h19eo2DxsXXGi+flkwMHW6m+DAQSlk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G4Qc7lbw1Xep7/Jde8REwzxd2uPAanLDme1jpeHJc+I=; b=G+K0kpjj7bKPDgVDxyu0NsDuhTSt02lYsmXPrYl144BqV8Ywwt0zOiKAdxzlwCsetc dbVA6K5uM9vAcbRaAz9pRVzT5G/OFx7Py2yLt6cAkcY1c//Athd12LEC4k0Anvvj/D2F LZtrbJK/5Zr3hpoY1AhRBoTUhobdRtK9D2XJQXRF96EU8my2XJUYqCagGXRUxOOHnQG7 qQ7lAWddNtb8Fn/ef4OPElFIT8+s11Qsz/utBccf1R0uHLE86XvoWRKKpvtj17/WOjnt xS9zLS+y9aRYyHBze5jh+ZijhF+iXRIQyPKhBWvrts0hfcYqp87ryTU0F0oC71MIXXIW xfjw== X-Gm-Message-State: AOAM531T5/hVciBilZ4PgjyDXwWaA5ndGN9gkCRa4XXdvUVhkmdq5NNM qF4otPstv3FYCYT7jvbB5Uv1bxz2MLWahw== X-Google-Smtp-Source: ABdhPJxPlz2Sk8KjoGptmJMBMwbIhphwT7u9ua7+WIC6pBrH/2LwT3bOvxkq3uKwsftzRarV7npttQ== X-Received: by 2002:a02:c044:: with SMTP id u4mr10125363jam.191.1642431897646; Mon, 17 Jan 2022 07:04:57 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id f21sm9379320iol.42.2022.01.17.07.04.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jan 2022 07:04:57 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Tom Rini , =?UTF-8?q?Fran=C3=A7ois=20Ozog?= , Heinrich Schuchardt , Bill Mills , Simon Glass , Mario Six Subject: [PATCH v2 11/16] sandbox: Add a way of checking structs for standard passage Date: Mon, 17 Jan 2022 08:04:23 -0700 Message-Id: <20220117150428.1580273-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1.703.g22d0c6ccf7-goog In-Reply-To: <20220117150428.1580273-1-sjg@chromium.org> References: <20220117150428.1580273-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.2 at phobos.denx.de X-Virus-Status: Clean Add a file which can be used to check that structs used in standard passage do compile. No other validation is done at present, but could be considered later. Signed-off-by: Simon Glass --- (no changes since v1) board/sandbox/Makefile | 3 ++- board/sandbox/stdpass_check.c | 36 +++++++++++++++++++++++++++++++++++ include/stdpass/README | 4 ++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 board/sandbox/stdpass_check.c create mode 100644 include/stdpass/README diff --git a/board/sandbox/Makefile b/board/sandbox/Makefile index 411b53c2b8d..d9b56adbbb8 100644 --- a/board/sandbox/Makefile +++ b/board/sandbox/Makefile @@ -2,4 +2,5 @@ # # Copyright (c) 2011 The Chromium OS Authors. -obj-y := sandbox.o +obj-y += sandbox.o +obj-y += stdpass_check.o diff --git a/board/sandbox/stdpass_check.c b/board/sandbox/stdpass_check.c new file mode 100644 index 00000000000..565124e1564 --- /dev/null +++ b/board/sandbox/stdpass_check.c @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * This file compiles all the struct definitions for standard passage, to ensure + * there are no errors + * + * Copyright 2021 Google LLC + */ + +#include + +/* BLOBLISTT_U_BOOT_SPL_HANDOFF */ +#include +void check_spl_handoff(void) +{ + __maybe_unused struct spl_handoff check; +}; + +/* + * See also doc/develop/std_passage.rst + * + * Instructions: + * + * 1. Add your header file to U-Boot, or to include/stdpass if it is not used in + * U-Boot + * + * 2. Add a function below to include the header and use the struct + * + * Template follows, see above for example + */ + +/* BLOBLISTT_tag here */ +/* #include if not used in U-Boot*/ +void check_struct_name(void) +{ + /* __maybe_unused struct struct_name check; */ +} diff --git a/include/stdpass/README b/include/stdpass/README new file mode 100644 index 00000000000..a972121f40c --- /dev/null +++ b/include/stdpass/README @@ -0,0 +1,4 @@ +This directory contains standard passage structures + +See doc/develop/std_passage.rst for instructions + -- 2.34.1.703.g22d0c6ccf7-goog