From: Kemeng Shi <shikemeng@huaweicloud.com>
To: akpm@linux-foundation.org, pasha.tatashin@soleen.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: shikemeng@huaweicloud.com
Subject: [PATCH 2/3] mm/page_ext: use page_ext_data helper in page_table_check
Date: Tue, 18 Jul 2023 22:58:11 +0800 [thread overview]
Message-ID: <20230718145812.1991717-3-shikemeng@huaweicloud.com> (raw)
In-Reply-To: <20230718145812.1991717-1-shikemeng@huaweicloud.com>
use page_ext_data helper in page_table_check to avoid access offset
directly.
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
---
mm/page_table_check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/page_table_check.c b/mm/page_table_check.c
index 84c8163984e5..46e77c12c81e 100644
--- a/mm/page_table_check.c
+++ b/mm/page_table_check.c
@@ -51,7 +51,7 @@ struct page_ext_operations page_table_check_ops = {
static struct page_table_check *get_page_table_check(struct page_ext *page_ext)
{
BUG_ON(!page_ext);
- return (void *)(page_ext) + page_table_check_ops.offset;
+ return page_ext_data(page_ext, &page_table_check_ops);
}
/*
--
2.30.0
next prev parent reply other threads:[~2023-07-18 6:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 14:58 [PATCH 0/3] add page_ext_data to get client data in page_ext Kemeng Shi
2023-07-18 14:58 ` [PATCH 1/3] mm/page_ext: add common function to get client data from page_ext Kemeng Shi
2023-07-18 14:58 ` Kemeng Shi [this message]
2023-07-19 9:44 ` [PATCH 0/3] add page_ext_data to get client data in page_ext Mike Rapoport
2023-07-20 2:38 ` Kemeng Shi
2023-07-20 5:37 ` Mike Rapoport
2023-07-20 8:37 ` Kemeng Shi
2023-08-11 21:39 ` Andrew Morton
2023-08-15 6:43 ` Mike Rapoport
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=20230718145812.1991717-3-shikemeng@huaweicloud.com \
--to=shikemeng@huaweicloud.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
/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;
as well as URLs for NNTP newsgroup(s).