From patchwork Thu Nov 13 02:56:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 49 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=1763002633; bh=QRsl01piLKMCBM3n24gmPkPpUbehCGp/Y/4M3zrSpcA=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=PronNI0EqK5E6LiuBuzqaeTRgizjtJq8S3eSYYCqum0yypSHSY27M5Sh0q9TNDY7N PBnyr8Huo9Kc4granKA41XYoeNmNHafk7Wd2fh11xYKSA1EXng/HQrxcHDj43OIKNS gjdyb/W6300nZpjrOFaHY5EFaj3ftyZarumYMy+T2I63OszWFcrHh1ClkfyUg+jF6i 3lF6mH/EEBP5PCXjjtEYNDw4laEpAyI9lYOqZu07IYT0xsYls68mxYG7qEUIyNg1us qsXcfF5Gz0IJoAJ4T9/d8tNQt0ChuDvNjSRnMrjvEMFVwVdJe8BJqmmD5stoGEuTfp xm9FKyzMhQx6Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EB32868582 for ; Wed, 12 Nov 2025 19:57:13 -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 RME3EJla2VfX for ; Wed, 12 Nov 2025 19:57:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763002633; bh=QRsl01piLKMCBM3n24gmPkPpUbehCGp/Y/4M3zrSpcA=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=PronNI0EqK5E6LiuBuzqaeTRgizjtJq8S3eSYYCqum0yypSHSY27M5Sh0q9TNDY7N PBnyr8Huo9Kc4granKA41XYoeNmNHafk7Wd2fh11xYKSA1EXng/HQrxcHDj43OIKNS gjdyb/W6300nZpjrOFaHY5EFaj3ftyZarumYMy+T2I63OszWFcrHh1ClkfyUg+jF6i 3lF6mH/EEBP5PCXjjtEYNDw4laEpAyI9lYOqZu07IYT0xsYls68mxYG7qEUIyNg1us qsXcfF5Gz0IJoAJ4T9/d8tNQt0ChuDvNjSRnMrjvEMFVwVdJe8BJqmmD5stoGEuTfp xm9FKyzMhQx6Q== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D8CD968580 for ; Wed, 12 Nov 2025 19:57:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763002632; bh=VlJDefAAkAnOX0eSBqxgqHwM1kPEwTk+BlI+iNEanSs=; h=From:To:Cc:Subject:Date:From; b=EvicFNbp7K+lFJ5wRdlJ6eqOgHygWPnnTliNzOiGrsAeBIIAkgLcRTKRMcpUbrT43 bOy0zLAOlQWny307kJh3o9/GPEIZtvihi9nqC/yJnO2g7tcD2tSzLUZ6j5kfUQLwyu CowdlZ0BBYDlejkPdfLaf4mogrlsYi0+7Yx9Uxn2C1j22zdIGba4VhaOPoL8jlDtvU LMLx+k6kk7vapBe0LEUNTkx9E/hHJOhIlO8gwiV2DYFAvCCLUu5BMXSz/BGmzG2HQ9 CriBzAtOyGNR5z04sifFVLxpNQWjfPzdpWVzdrkqyGD3hSpl7/AUlThtFgbm6iBdgU KN408vJnQNoGw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 28B2C68507; Wed, 12 Nov 2025 19:57:12 -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 7pSYV7-R7JZj; Wed, 12 Nov 2025 19:57:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763002628; bh=gki5DK3fV26usfjRB+khwSQTEXcwKKustpUtx/4lINw=; h=From:To:Cc:Subject:Date:From; b=M+dYIjuA2FahLs3DY9yB1m/KWp2KFN4J0iEZbcSDr8Qc4kyljQhCPqHyUB6M5yX79 DChtD1apxegsGkFe7wjKuQymLWIcdeFKKDIEmdoMTTJco3X5xxZvF6DRh0UPAjhtCS MdjZw/Y+ncGMwT1KXpzUX18c3fTliBYPuUkDUclfM6T2gPbcCtAeTuV2b6BOcImMIp n9/VqxZads0Nz3FP+DiTejMQYG4lIetFrwY3u3hfzX1I2fM4uCuVoBFmO8MZWoy7oq EnWMVOYABDPwE/oDgzJ9yPdPSCbuQxhQaoioNyEVFQws3i0amDR5+N6O7SuPP7DI/+ IweGNSDkXbPGg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CDBBB6838E; Wed, 12 Nov 2025 19:57:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 12 Nov 2025 19:56:48 -0700 Message-ID: <20251113025657.3862482-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: ZGIOGFT6FS42EI2Z4X5PPIFOQBYJG7S2 X-Message-ID-Hash: ZGIOGFT6FS42EI2Z4X5PPIFOQBYJG7S2 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 0/6] fat: Some code improvements 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 This is an attempt to improve the structure of the FAT code, since it doesn't fully follow the U-Boot conventions: - fat_write.c includes fat.c which is odd - use of __u32 and its ilk - use of typedef - old-style struct comments This series resolves these problems, making it easier to take on other improvements in future. Simon Glass (6): fat: Create an internal header file fat: Separate fat.c from fat_write.c fat: Update struct fat_itr to kernel-doc style fat: Remove typedefs in fat.h fat: Convert fat.h to kernel-doc style fat: Use standard types for fixed-size values fs/fat/Makefile | 2 +- fs/fat/fat.c | 316 +++++++++------------------------- fs/fat/fat_internal.h | 171 +++++++++++++++++++ fs/fat/fat_write.c | 246 ++++++++++++++------------- include/fat.h | 385 +++++++++++++++++++++++++++++++++--------- 5 files changed, 677 insertions(+), 443 deletions(-) create mode 100644 fs/fat/fat_internal.h