linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kemeng Shi <shikemeng@huaweicloud.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Cc: shikemeng@huaweicloud.com
Subject: [PATCH 3/3] mm/page_ext: move page_ext_operations definition under CONFIG_PAGE_EXTENSION
Date: Mon, 17 Jul 2023 19:32:27 +0800	[thread overview]
Message-ID: <20230717113227.1897173-4-shikemeng@huaweicloud.com> (raw)
In-Reply-To: <20230717113227.1897173-1-shikemeng@huaweicloud.com>

page_ext_operations should only be defined when CONFIG_PAGE_EXTENSION is
enabled.
Besides, this may detect missing rely on CONFIG_PAGE_EXTENSION from
future Page Extension client at compile time.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
 include/linux/page_ext.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/page_ext.h b/include/linux/page_ext.h
index 67314f648aeb..8dd21d87e0da 100644
--- a/include/linux/page_ext.h
+++ b/include/linux/page_ext.h
@@ -8,6 +8,7 @@
 
 struct pglist_data;
 
+#ifdef CONFIG_PAGE_EXTENSION
 /**
  * struct page_ext_operations - per page_ext client operations
  * @offset: Offset to the client's data within page_ext. Offset is returned to
@@ -29,8 +30,6 @@ struct page_ext_operations {
 	bool need_shared_flags;
 };
 
-#ifdef CONFIG_PAGE_EXTENSION
-
 /*
  * The page_ext_flags users must set need_shared_flags to true.
  */
-- 
2.30.0



  parent reply	other threads:[~2023-07-17  3:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230717113227.1897173-1-shikemeng@huaweicloud.com>
2023-07-17 11:32 ` [PATCH 1/3] mm/page_poison: remove unused page_ext.h from page_poison Kemeng Shi
2023-07-17 11:32 ` [PATCH 2/3] mm/vmstat: remove unused page_ext.h from vmstat Kemeng Shi
2023-07-17 11:32 ` Kemeng Shi [this message]
2023-07-19  3:41 ` [PATCH 0/3] minor cleanups to page_ext header Kemeng Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230717113227.1897173-4-shikemeng@huaweicloud.com \
    --to=shikemeng@huaweicloud.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox