Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4035811rdb; Mon, 11 Dec 2023 07:13:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjUaYw+94qI1Eywm65z5koi01e2DMlxtVeGpFSG36X53AoQQ8weyB9rIJ3hIycEmN7tkgr X-Received: by 2002:a05:6a00:1914:b0:6be:acc:8973 with SMTP id y20-20020a056a00191400b006be0acc8973mr1985492pfi.20.1702307581046; Mon, 11 Dec 2023 07:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702307581; cv=none; d=google.com; s=arc-20160816; b=QVNl8Z7b39BxRZXgXc4zq2CTIK4wq3l4xN2+7cy4Z6jOWqYJqbpMo9zZVb09VcwuAD tJIY5d7uJDDRNoZAFc37wJFkanoAIEqhXIJwxsncDUcHpwOHzqm6dTazgVvP4TSAf7ks aPceqFHnMxLHArUZM29sxHU3a1DeFw3KOVr/QymGuWnPPX/ndPlv/pt3iGMLoCBWMMIv XF6JaOi/wZophj3r4dPBSnTDoBHsBjoNrgKdOrNIH76cFSLDis/GAi8JCKQxxKc7VOrE Ucbu8x1jBPGSL3YFArWgx4BdB9I4lRWO5GLVNWG6Wbt53JxhtVyXFZxFd/EF2lCkpO6d dveA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AK2BzAx/YAHFbh+6Z+0veROK6HPT0/oAubfaxj7UV2s=; fh=VnHePBdZUjdaV+E7tDQImaAIoR9tYPkdJhQSLZp3NaI=; b=XzQGgzaN5pMhlkroVcVpr7zIeRrfPD60FL5uuST8iexOinBvOjpWVY/W/4gif/b+wV 8aKnfCJYecNCIm/V6iAlYjY0SFl3vkzfJ/dd5YDGIqKczcFFAQ1NmauvphFNIp7Xzcpg 7hJoH7tpUg/JzA95wPHXaehdBvDZw9c9OZ6/Or4o/8UPLJRX5VSPJfCIWfSqeKdSoc+D 0fJh5F47O7G9pzssaSm9kK2SfjiTq+CJJAVgrxGKFHaKXaMdt4WEndZmFQBSkd4ghvdx yyhlhixl8/qfrT1qOC8DlZ5pkId96TurfyCKgoIlw61qnilVG0WhBsfJb9tPNJYX/ahT 7uUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HztDremx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id g10-20020a056a00078a00b006cc0219fc85si6129606pfu.252.2023.12.11.07.12.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 07:13:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=HztDremx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D13F48062342; Mon, 11 Dec 2023 07:12:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344098AbjLKPMl (ORCPT + 99 others); Mon, 11 Dec 2023 10:12:41 -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: 8bit X-GND-Sasl: romain.gantois@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 11 Dec 2023 07:12:57 -0800 (PST) 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 => include/linux/gpt.h | 0 4 files changed, 4 insertions(+), 3 deletions(-) rename block/partitions/efi.h => 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 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" /* 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 #include "check.h" -#include "efi.h" /* * 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 -- 2.43.0