| Message ID | 20260121220857.2137568-27-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=1769033454; bh=4ydvfayrO4nxa91joSiOYSIpIfmB+7RnT9Tlu9wnlqs=; 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=vN0gD04PJYd23j3NoDuET0K+pYOC5xOD2WNiitpzl7Gb0WLhh+i7PU/nS8G9dLRH0 L9BcEwGrqoG+JtU/QihyO1e73aEqh3NYdZ36TOQMLZYqwwVf92yCZhGRAXokgfpCmE Jhjn4LbXUaG+xo58qdSufFeAZZAjud/osxQaXKTLwRG4tqrsE8aDAGe9RHeNIucfxF DvrGBPyDdTsOed3HKEpzJcj04wYgT0TWcT0xHZLKKSt2Plr/qxDuuPzli6eg/O+x0U Cjt18ohLK9/RMadlEffYSVOfKrCqkLub9JGW7dsGMiAjpqXyW0dyObxSP2cbfAcFOJ 4PDWrOkM1gnMA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0A88669601 for <u-boot-concept@u-boot.org>; Wed, 21 Jan 2026 15:10:54 -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 V1wWFm1rJPxO for <u-boot-concept@u-boot.org>; Wed, 21 Jan 2026 15:10:53 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033452; bh=4ydvfayrO4nxa91joSiOYSIpIfmB+7RnT9Tlu9wnlqs=; 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=uCI9iwf1T1fmQMvy/HsTvGl9baraqKy9odmFYms2suotmeEotCGmKJHurcb0okuBI Hv+xYxoF4rqNd7CQR8Tn8fbHvXM7aVn4DQhUZbwB0jNS77VYKEKpG1DYAIwTcaD+r7 cMjZ75YfTIDmfOn4TQWd88XyETVIvc2JXRxu8Qg5aRprQUivnWzd18VQxfkTSG/dCj FswSPLrXXKPD1StucKg1+NxCU6gbm/WvfHxqelpdEQn+bGTPm00/Lcu7qoS4jO6ZIj JWkORI4bYPZ2iP7QuhTtmPX+o6NaA7o72qQx1ZW0CjpVh6HEQMY5fxwjcIBLWJnqVx U1MWXLQmy2FBA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6F15C695F7 for <u-boot-concept@u-boot.org>; Wed, 21 Jan 2026 15:10:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033449; bh=3i42E4dTNxsftPHA2JHUrAyPbDRzj0JBSaroEIEYEzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CSbDuhkJl1jmDJSBer7cvwwG/LHrYWWw7JnKxFsW9NiY1k1mmHJEDm1zz3CNpnwQF ddWCwz1/blYihtZQs8o1lCxpq43dLfk2sh7sggTSuXIHZ9yz5s/Xzj41GwOYqZTkl3 Cy+HpvsPI7sxgTyLeAbNa7wIvMNZ1j+DvuTSDzW0wdGo/UGe8WgA/VRZ/+Vu1cOtLb 9O2vsgMjALPc3evl2tnhNSKAwwulr2196DQ4nQwCqaOe6Dop0ai2EUD802DAnPZGA2 4dfZ+9apczRBtrbF8yV7heUcoLseQWxXOR+4v0wbRKwO3ZtyFzKX87TPqdk3CEG0ii 2c1jvrXkh4M6w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6B52F69601; Wed, 21 Jan 2026 15:10:49 -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 CaelumBA3QGx; Wed, 21 Jan 2026 15:10:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033449; bh=R/cMCwM1Piln7qnJBVWO4kbtRG5xPRo8yHDj2GfZGks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XRmKM9Hbf2w1b5GGegr3OiKgZdyg4CQHYRHy/Oszz4t4YDYvX7u3mPqt0cYGh/LdV jXlIeItPrQR/47n49TLvWa8Kzj5tIeMd+4bog03kPX5w2etNFvzZ87ze7hmiFluEfV 905/zlN9+l2KYjLSpnYK7ZCFl0zkb4Nidk3bY9ZQhss981NGf4Ou4Pq8XwWOz4VLAw V1axml51sIimS7NNEjuZaTxhBWn4GuRi/MwsGBz3Euu039S22pwEVAmliduuew80VW HnoY+KzkxOckf5kNGX1510cvX9ExC6hi8VO9DcCL1hYjxMvaLEoCPMXnkwM/KeF95D Vqh6f63rsyaUg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id DBE9E695F2; Wed, 21 Jan 2026 15:10:48 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 21 Jan 2026 15:08:39 -0700 Message-ID: <20260121220857.2137568-27-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: JY4QTYQUJTSSL7WJ4G7BTHXCV5VV2SHN X-Message-ID-Hash: JY4QTYQUJTSSL7WJ4G7BTHXCV5VV2SHN 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 26/33] ext4l: Move nd_terminate_link() to linux/namei.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/JY4QTYQUJTSSL7WJ4G7BTHXCV5VV2SHN/> 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 this pathname lookup helper to linux/namei.h where it belongs. This reduces ext4_uboot.h from 431 to 425 lines. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- fs/ext4l/ext4_uboot.h | 6 ------ include/linux/namei.h | 8 ++++++++ 2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 8d1aa0e504e..4e8c2199800 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -223,12 +223,6 @@ struct path; #define kfree_link kfree -/* nd_terminate_link - terminate symlink string */ -static inline void nd_terminate_link(void *name, loff_t len, int maxlen) -{ - ((char *)name)[min_t(loff_t, len, maxlen)] = '\0'; -} - /* * Additional stubs for super.c */ diff --git a/include/linux/namei.h b/include/linux/namei.h index 7b66fb242d6..10ea86dc49d 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@ -23,4 +23,12 @@ #define LOOKUP_EXCL 0x40000 /* Exclusive create */ #define LOOKUP_RENAME_TARGET 0x80000 /* Rename target */ +#include <linux/minmax.h> + +/* nd_terminate_link - terminate symlink string */ +static inline void nd_terminate_link(void *name, loff_t len, int maxlen) +{ + ((char *)name)[min_t(loff_t, len, maxlen)] = '\0'; +} + #endif /* _LINUX_NAMEI_H */