From patchwork Thu Nov 13 02:56:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 694 Return-Path: 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=1763002642; bh=UiVJ7tgXhQ/FjxXpWqCd78GBwXfnvWKF3u8170EieSc=; 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=G+Xu/q3/3OqoP5PNLfILYLytZPu1lMJMSsK2BaPpepG8+DWy72w/q5gIS9ojbWDRo vFdg1SyuaX1Df9DQzURSFRJfcTgYb1+3xDK8YR5yZ3u13orLcTsO96bRn2jguCTOot /OfCUHRJBgQbZ1XtVUDH2zhC+D0qUjiSrgER0tPeDcs6IOtGV41nowYozz/kOBALbg wWoGcMS+s2bm4ZdYmVHAQ9d/lGT/wDRSu9tqKLQbAdrav5VLMRjcsj/2OmzwdcVjHh gVIHVb/+dFl4PhAPYRnPoDNCdTY4yMycruNF/v6inZ7AYBwtCyAWd2nibcFWOQWUJ8 VyOIXqdocVN4g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CFC6368507 for ; Wed, 12 Nov 2025 19:57:22 -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 aHW96pbLL913 for ; Wed, 12 Nov 2025 19:57:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763002642; bh=UiVJ7tgXhQ/FjxXpWqCd78GBwXfnvWKF3u8170EieSc=; 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=G+Xu/q3/3OqoP5PNLfILYLytZPu1lMJMSsK2BaPpepG8+DWy72w/q5gIS9ojbWDRo vFdg1SyuaX1Df9DQzURSFRJfcTgYb1+3xDK8YR5yZ3u13orLcTsO96bRn2jguCTOot /OfCUHRJBgQbZ1XtVUDH2zhC+D0qUjiSrgER0tPeDcs6IOtGV41nowYozz/kOBALbg wWoGcMS+s2bm4ZdYmVHAQ9d/lGT/wDRSu9tqKLQbAdrav5VLMRjcsj/2OmzwdcVjHh gVIHVb/+dFl4PhAPYRnPoDNCdTY4yMycruNF/v6inZ7AYBwtCyAWd2nibcFWOQWUJ8 VyOIXqdocVN4g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BEE0768546 for ; Wed, 12 Nov 2025 19:57:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763002640; bh=t/+jszczyw0QCb/BgGw77MJUQR6dUWNclb0S8/dy5ys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rICLnBp5BttjVDdrLxKCwEQWO8x/HMqYDg6/5iHI78j/swql6XW+kb8N8ljlqE2gR AJ+7UY/vSsVXeJh5w1eMoG/9h+MDL2Q51bxZ5ol8O0pfN8OEivQYUQnj3HHs/eWhtP 8x0MeJILDUAFcXdqqfv/3exx04JCrwedrYf0wANi73PNlwghfMdj+MirCaaBJCL2vm 2v9oMu33jyAFldHluczhXDStzfjYADz9fQZrihdHZQJKmSTfGmDaI7ABlB/ZVwFx4D Caakpek+Se30TT32OIeqFg33etA/SY7E6Fbk+uznCWvhWbehijkbCd8muBwz/9IJ35 DahJgS9q7W+RA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BE2AE6856C; Wed, 12 Nov 2025 19:57:20 -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 VaEVLRgLB_Ig; Wed, 12 Nov 2025 19:57:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763002639; bh=PUDrVuBqznMLZch4CXNoIOm6F0/cCU+dKU94j7i4cVE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K/ZWDlmXxlSDeg/mL1f3oD5/A6nsd6llVuqjRNns7SFhDH8PLaSMCNJa98yphYzFp f5ipo05qGMu0mCYNBYtWDW7U+3u7dAGTI7Z5uZZRKsyMf26nn7YlfDmsWKxsm/QRf6 YH5P8SKQB4dhBnBobIyFf55IsGkG9huGXrEZL/L0ncOO6b4c+Qye97ngPIbFAq0Vwp I5k1CSonrt1Z9eJ0mPZl+PmRBv8hKQTlrshI+3qpiE++3bQn7QnvObojeRlILgmjW0 cRPYQaDUbyXJ8c5HX0fpgjIcDJg1DhREQFbK0Xp0vtpClpC0QHJVnAHW5Jjg7a8n6N 1+ad9uphkIB1w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2933768546; Wed, 12 Nov 2025 19:57:19 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 12 Nov 2025 19:56:51 -0700 Message-ID: <20251113025657.3862482-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251113025657.3862482-1-sjg@u-boot.org> References: <20251113025657.3862482-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 3SYIGYR5AUWZGJBILVZB5FOGCJ7OXYNF X-Message-ID-Hash: 3SYIGYR5AUWZGJBILVZB5FOGCJ7OXYNF 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: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 3/6] fat: Update struct fat_itr to kernel-doc style List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Convert the struct fat_itr documentation from the older style with separate @field comments to the standard kernel-doc style where field descriptions are listed in the header comment block. Co-developed-by: Claude Signed-off-by: Simon Glass --- fs/fat/fat_internal.h | 60 +++++++++++-------------------------------- 1 file changed, 15 insertions(+), 45 deletions(-) diff --git a/fs/fat/fat_internal.h b/fs/fat/fat_internal.h index 10881a15569..bc52d534b46 100644 --- a/fs/fat/fat_internal.h +++ b/fs/fat/fat_internal.h @@ -32,6 +32,21 @@ extern struct disk_partition cur_part_info; /** * struct fat_itr - directory iterator, to simplify filesystem traversal + * @fsdata: filesystem parameters + * @start_clust: first cluster + * @clust: current cluster + * @next_clust: next cluster if remaining == 0 + * @last_cluster: set if last cluster of directory reached + * @is_root: is iterator at root directory + * @remaining: remaining directory entries in current cluster + * @dent: current directory entry + * @dent_rem: remaining entries after long name start + * @dent_clust: cluster of long name start + * @dent_start: first directory entry for long name + * @l_name: long name of current directory entry + * @s_name: short 8.3 name of current directory entry + * @name: l_name if there is one, else s_name + * @block: buffer for current cluster * * Implements an iterator pattern to traverse directory tables, * transparently handling directory tables split across multiple @@ -51,65 +66,20 @@ extern struct disk_partition cur_part_info; * For a more complete example, see fat_itr_resolve(). */ struct fat_itr { - /** - * @fsdata: filesystem parameters - */ fsdata *fsdata; - /** - * @start_clust: first cluster - */ unsigned int start_clust; - /** - * @clust: current cluster - */ unsigned int clust; - /** - * @next_clust: next cluster if remaining == 0 - */ unsigned int next_clust; - /** - * @last_cluster: set if last cluster of directory reached - */ int last_cluster; - /** - * @is_root: is iterator at root directory - */ int is_root; - /** - * @remaining: remaining directory entries in current cluster - */ int remaining; - /** - * @dent: current directory entry - */ dir_entry *dent; - /** - * @dent_rem: remaining entries after long name start - */ int dent_rem; - /** - * @dent_clust: cluster of long name start - */ unsigned int dent_clust; - /** - * @dent_start: first directory entry for long name - */ dir_entry *dent_start; - /** - * @l_name: long name of current directory entry - */ char l_name[VFAT_MAXLEN_BYTES]; - /** - * @s_name: short 8.3 name of current directory entry - */ char s_name[14]; - /** - * @name: l_name if there is one, else s_name - */ char *name; - /** - * @block: buffer for current cluster - */ u8 block[MAX_CLUSTSIZE] __aligned(ARCH_DMA_MINALIGN); };