From patchwork Wed Jan 21 22:08:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1753 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=1769033459; bh=qmNg4+l/Ab+vB5NZByObsPdwemufcowJ108v8mludT0=; 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=aBtK5g+b4+F2HdUDFBV7BEJalBVO092VyD1O3y0Y5sFOFAYs+etAbr8IgaxclqNRt dUdRXh4VZEU2MYkkFcXJ/fBOn5gbgqVHKRN3SXKXZUad6qPYdw71WdmUadskkVklr+ 7WiEavXZDSQM+Zd/OhevgMI52jQq3lvRdFaq8YJzp4bg1CY31PxuOrNz4tX1Iiukvk OF3wWa8LjPSzcvFrgvv3utRBZRGXfej2h9PpXpspDqoAdxS4/UBYMKaA3cXjM+aMZY hkQEdVWGMjOQEqHJCE9LWnPrxA0NpF+8hJ3JeGLm08MEZfO7T6dzZcO2N4/dE9qqg9 0GvF7SYi14/ug== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 026D969611 for ; Wed, 21 Jan 2026 15:10:59 -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 ukTes20FrOvt for ; Wed, 21 Jan 2026 15:10:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033458; bh=qmNg4+l/Ab+vB5NZByObsPdwemufcowJ108v8mludT0=; 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=sIZkcJW5A4ZBa1Wir05G0yhkxQEGEYHVQn7CQoFnOv7fV3IQEOxrqHXMjPxvAYGCV MsQVAiYnhlEThT9NhLdSmpJWwYYjp2LgMu9vMIzOwxnLBsDj+hiahGkW9oSGg9ZmHY TAYW9Tu3Y8t5qZYFslTlpRW5pUH4A+9JeVHZHnU08csbnTjjBRevXyqyRO+HuplV/R QTWSR80xxlCPrCpJsEtMrN6OdzVIJZ+N3b6vzaKnuZ7IFvfvPXLU5wTdrAJiie/sVE uPbZ2bRyKp/2iyLB2ikGp2ziEyZHHj7rfGkzfiTIcvl2NCo7TO2bdn3m6VIo0kefiW YDYKmZ2IwygoA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E4DC469601 for ; Wed, 21 Jan 2026 15:10:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033456; bh=TDBQvH17ljKZznT+GBa2iw2RioVl1no8ocRogFu6fV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q9FP1E1EeOwB4GmIYIScM9vG5SPOc6aqDgrxmwX6KOXcRmur40SLhUPFPtSIXrblp Tc/+ouLFK2BujyUGFHpHzV7Bwbqx+fME3FIMrcdrg3bZTwqaqjH/FF2C2wSSClXVuK hxeZFccj39aFETkxUzwkn9iMxGd0VA7lxQyYvgWyW2PGGwKl5HsW7MhS//rfjTntkc enN9rAnerLIHHoDGbDFc1vtMT/0MTxgYhooCGLeW0lrhOPnoc8gSa/s0rpNJSHO31Y ADTGKk0/fwjIrPXIU/K5MFk8jQh8zVArj6xSlvmkjv8dZgpBABgd0io6Ba/3BRmgYH HxfcZNulQ61rg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 52FF2695F2; Wed, 21 Jan 2026 15:10:56 -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 mQObfDZytYbG; Wed, 21 Jan 2026 15:10:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1769033449; bh=ZHTQWGCgg6ge1HWoV8zZoHufGGbIxFDg4Hq2XJvKPYs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vF1ySzjdCikN+vjHJ/uiEGCjYSThrl7fNeP6SkXI80uURr4iqA9PGleKLgeonSDiN 0Vce+jD1S9bbyhl0mmu46+/HtmX/rL9F/Y1ddjOSHfkIWaX1KY+cH9NZvuEshdpuCR Ub8fWg3c03YNdMfpU4naTaYGFt6ay6bA3WMvtRst6oJLWPovC0rYo2kjZr/ogP5PXP ho3okRYUkFqWXD0apCTOMwN1FsJFP/W1OuOHNYWPH32DMyA6NiK/3raFuzJiBUpNor w9gM6beGFuo67kPMPmJppcn0X87/Qh318OBg8V+AuxEiEonQED433mtfhsA0KmGFta V7+ClhWlK0wEQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A993E6961F; Wed, 21 Jan 2026 15:10:49 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 21 Jan 2026 15:08:40 -0700 Message-ID: <20260121220857.2137568-28-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: TSNQDUMCRUMERDVBPT3KVGBUTKNT5VLM X-Message-ID-Hash: TSNQDUMCRUMERDVBPT3KVGBUTKNT5VLM 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 27/33] ext4l: Move blk_holder_ops to linux/blkdev.h 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 Move the blk_holder_ops struct definition and fs_holder_ops to linux/blkdev.h where other block device operations reside. This reduces ext4_uboot.h from 425 to 420 lines. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 6 ------ include/linux/blkdev.h | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 4e8c2199800..6f8c78bdeb0 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -269,12 +269,6 @@ void ext4_unregister_li_request(struct super_block *sb); /* I/O priority classes - use linux/ioprio.h */ #include -/* blk_holder_ops for block device */ -struct blk_holder_ops { - void (*mark_dead)(struct block_device *, bool); -}; -static const struct blk_holder_ops fs_holder_ops; - /* end_buffer_write_sync - implemented in support.c */ void end_buffer_write_sync(struct buffer_head *bh, int uptodate); diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 89d284dab26..1ee5b33da72 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -83,7 +83,10 @@ void invalidate_bdev(struct block_device *bdev); unsigned int bdev_max_discard_sectors(struct block_device *bdev); /* Block device file operations - implemented in ext4l/stub.c */ -struct blk_holder_ops; +struct blk_holder_ops { + void (*mark_dead)(struct block_device *, bool); +}; +static const struct blk_holder_ops fs_holder_ops; void bdev_fput(void *file); void *bdev_file_open_by_dev(dev_t dev, int flags, void *holder, const struct blk_holder_ops *ops);