From nobody Fri Dec 19 14:47:37 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1E97C10F05 for ; Mon, 11 Dec 2023 15:12:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344103AbjLKPMm (ORCPT ); Mon, 11 Dec 2023 10:12:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343886AbjLKPMi (ORCPT ); Mon, 11 Dec 2023 10:12:38 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B19FDEB; Mon, 11 Dec 2023 07:12:43 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 86060E0002; Mon, 11 Dec 2023 15:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702307562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AK2BzAx/YAHFbh+6Z+0veROK6HPT0/oAubfaxj7UV2s=; b=HztDremxIKWyhs4ljQkUaZkbUnkwWn3NamgaEJlyhZLnq7OoF09J2svtlEqppxF+2rFsmS FNMGnqBM38azQmBQUAq/NYb8lNmqBEBsaWeCZFspt0Xg3hYHkLJpZMgjMOBI153sp/nTF1 l7oUhk9myflVEYuLZh8u25rzeHSv/7yyonWorOnDUgCWHI0rwIxfjBaI3/y0y/dfcLGlYd pXUqTfZ4d1pRpLAlaVvuVyf5bl2c4/bOnlI/IOwEXBbuE3gEYCubQegSqP/ILiyd2gUqCY tSXqIC+Qbr/PG+7ES0+Tt0GkMzm3ENvr/yj/MKDjwUL4Is0B36EMq1qiWd7L4A== From: Romain Gantois To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jens Axboe , Davidlohr Bueso , Ard Biesheuvel Cc: Romain Gantois , Thomas Petazzoni , Herve Codina , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-efi@vger.kernel.org Subject: [RFC PATCH 1/6] block: partitions: efi: Move efi.h header to include/linux/gpt.h Date: Mon, 11 Dec 2023 16:12:37 +0100 Message-ID: <20231211151244.289349-2-romain.gantois@bootlin.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231211151244.289349-1-romain.gantois@bootlin.com> References: <20231211151244.289349-1-romain.gantois@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: romain.gantois@bootlin.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The GPT parser located in the block layer defines all of the GPT-specific data structures and logic that are necessary to parse this kind of partition table. However, it is also specifically tailored for block devices. Assuming that different GPT parsers will be implemented in other kernel subsystems, it is desirable to create a common set of GPT struct definitions, macros and helpers, so as to limit code reuse between parsers. As a first step towards this common codebase, this commit moves the efi.h header, that contains GPT-specific definitions, to include/linux/gpt.h. There is no functional change. Signed-off-by: Romain Gantois --- MAINTAINERS | 3 ++- block/partitions/efi.c | 2 +- block/partitions/msdos.c | 2 +- block/partitions/efi.h =3D> include/linux/gpt.h | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename block/partitions/efi.h =3D> include/linux/gpt.h (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 97f51d5ec1cf..22e37e2ea1ae 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9233,7 +9233,8 @@ GUID PARTITION TABLE (GPT) M: Davidlohr Bueso L: linux-efi@vger.kernel.org S: Maintained -F: block/partitions/efi.* +F: block/partitions/efi.c +F: include/linux/gpt.h =20 HABANALABS PCI DRIVER M: Oded Gabbay diff --git a/block/partitions/efi.c b/block/partitions/efi.c index 5e9be13a56a8..db50c3f2bab3 100644 --- a/block/partitions/efi.c +++ b/block/partitions/efi.c @@ -87,8 +87,8 @@ #include #include #include +#include #include "check.h" -#include "efi.h" =20 /* This allows a kernel command line option 'gpt' to override * the test for invalid PMBR. Not __initdata because reloading diff --git a/block/partitions/msdos.c b/block/partitions/msdos.c index b5d5c229cc3b..d0376cf27448 100644 --- a/block/partitions/msdos.c +++ b/block/partitions/msdos.c @@ -27,9 +27,9 @@ */ #include #include +#include =20 #include "check.h" -#include "efi.h" =20 /* * Many architectures don't like unaligned accesses, while diff --git a/block/partitions/efi.h b/include/linux/gpt.h similarity index 100% rename from block/partitions/efi.h rename to include/linux/gpt.h --=20 2.43.0