| Message ID | 20260121220857.2137568-33-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033479; bh=pZ8baHfKGEHiDcm0dexJtNs8dAjobZD0nT5RFaJJLl8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jyru6Ob/aqz56GFODm9YmdChMM8ORCd3rm95LRjfcjkSjHKbRrqQPmDU992iVZFLd mwL61Jqy1rdcRKX9ZJ1AJPZMtHSqW5skUWccsNfxemObmetH+nbrd3Quqiz6FwJIQi YPXs8KyRvhZbAJ5aa8ARPDo8brM2o+c2iBOjP1cKdCJU9qp60iGxhliRYMf/LaBRSM ruDYedDrm9F5RHK0W3eWaeUPqVAYvPPXtPgiIN1V9JzhQULZmG1CxnqAMFg8LIqz3j zT7HQTJ/Nw/2p5WQnSYHrzIGi5crCnETwTlCbAzmpuqi88F9SMjKb36rbzNdoaeLQN uXVP39x+I5DOQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A732169601 for <u-boot-concept@u-boot.org>; Wed, 21 Jan 2026 15:11:19 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id PPlkVGmUqg9G for <u-boot-concept@u-boot.org>; Wed, 21 Jan 2026 15:11:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033479; bh=pZ8baHfKGEHiDcm0dexJtNs8dAjobZD0nT5RFaJJLl8=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jyru6Ob/aqz56GFODm9YmdChMM8ORCd3rm95LRjfcjkSjHKbRrqQPmDU992iVZFLd mwL61Jqy1rdcRKX9ZJ1AJPZMtHSqW5skUWccsNfxemObmetH+nbrd3Quqiz6FwJIQi YPXs8KyRvhZbAJ5aa8ARPDo8brM2o+c2iBOjP1cKdCJU9qp60iGxhliRYMf/LaBRSM ruDYedDrm9F5RHK0W3eWaeUPqVAYvPPXtPgiIN1V9JzhQULZmG1CxnqAMFg8LIqz3j zT7HQTJ/Nw/2p5WQnSYHrzIGi5crCnETwTlCbAzmpuqi88F9SMjKb36rbzNdoaeLQN uXVP39x+I5DOQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 960A6695F7 for <u-boot-concept@u-boot.org>; Wed, 21 Jan 2026 15:11:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033477; bh=2ExnwQRNB3iLjBqXPYbSMcGLb9Fxcc2j9TUnke3O2c0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eA8ppvG7u0UMevLz8kMImgNoNywVzXMEVEdvH3XY1l/WuOAvweMsK8uqjn2EYWqZ2 Zaq2RvU8phFEMqgxQFRcoumQpsXkvSP9fA0FfwCW+N6yZbH5kXjHy8xtjTfvQMK4Oc N2BGYvs/Xrjwz59lAoPJplSIFhtz50ilN0HVicdC2Yfaokr6HYdlzPLQ8gbyCrH/7N Q3rhfa9N44qTFnjP5KwcuyaOU95gWdfMlnn3Rc4vxLiFNYXh6/8RY1pmpsB4fdI4Pe oVY+5C+VBjIh339xJi0l3PvBsfXI/Y9z1X1JrXpk48cy2PBuT3SpMIxNrCRTor7Vus G/5pdjy7snXJA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 98F456954C; Wed, 21 Jan 2026 15:11:17 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id AhgMoUfQn3_L; Wed, 21 Jan 2026 15:11:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033473; bh=Na23soMcghw3Sre3QwX42HYW+IiDNfHG90uDiXSRIFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gbUXlguMcmzaXt3VTEoDQUzsHLBARPKF5RUSjO/0ErkiQ2+Y6Ez13CaY5CX11jIbq XnW168rETn81AeZ1fGQKhWq60GjeAVZPUoeEIBdq8RB52dG1xkGPNbNRz8mLFEABfR 1j4TsuYMHB7UkRb+ocrw6Z6MmEn2++ylzf3fLhrnI3+sZh9wX19MMOlfhfxW3wY0R4 7k7f1mhVmzXtf8l/5elzFDC/bO/OnATyMaiATdNPGYM33SscS6vgeh15TbKEwAkGTt WymVmK+whx0KFY8pIti6N1cS+o8n4A6wvcmhIWGjy7+PLwncsEmiSaEGQfSBd2QOM/ 5lo0vWoqxamQQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id F1D2069490; Wed, 21 Jan 2026 15:11:12 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 21 Jan 2026 15:08:45 -0700 Message-ID: <20260121220857.2137568-33-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260121220857.2137568-1-sjg@u-boot.org> References: <20260121220857.2137568-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: B3EGGSEKB3F2WJ64JWB3GCG6G57WBXA7 X-Message-ID-Hash: B3EGGSEKB3F2WJ64JWB3GCG6G57WBXA7 X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <simon.glass@canonical.com>, "Claude Opus 4 . 5" <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 32/33] linux: Add DEFINE_RAW_FLEX to linux/overflow.h List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/B3EGGSEKB3F2WJ64JWB3GCG6G57WBXA7/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
Reorganise ext4l compatibility stubs
|
|
Commit Message
Simon Glass
Jan. 21, 2026, 10:08 p.m. UTC
From: Simon Glass <simon.glass@canonical.com> Move DEFINE_RAW_FLEX macro from ext4_uboot.h to linux/overflow.h where it belongs alongside struct_size() and other size helpers. In the kernel this macro allocates a flexible array struct on the stack. In U-Boot it is stubbed to NULL since the code paths that use it are not exercised. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 4 ---- include/linux/overflow.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index ad3e59a7f6c..04ed9c3c846 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -297,10 +297,6 @@ int sync_filesystem(void *sb); #include <asm-generic/timex.h> #include <linux/nospec.h> -/* DEFINE_RAW_FLEX - define a flexible array struct on the stack (stubbed to NULL) */ -#define DEFINE_RAW_FLEX(type, name, member, count) \ - type *name = NULL - /* * Stubs for page-io.c - bio types are in linux/bio.h */ diff --git a/include/linux/overflow.h b/include/linux/overflow.h index 672377ede42..75e8ad44ecf 100644 --- a/include/linux/overflow.h +++ b/include/linux/overflow.h @@ -20,4 +20,16 @@ #define struct_size(p, member, count) \ (sizeof(*(p)) + sizeof((p)->member[0]) * (count)) +/** + * DEFINE_RAW_FLEX() - Define a flexible array struct on the stack + * @type: Structure type containing flexible array + * @name: Variable name for the struct pointer + * @member: Name of the flexible array member + * @count: Number of elements + * + * In the kernel this allocates on stack; U-Boot stubs it to NULL. + */ +#define DEFINE_RAW_FLEX(type, name, member, count) \ + type *name = NULL + #endif /* _LINUX_OVERFLOW_H */