From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Rikard Falkeborn <rikard.falkeborn@gmail.com>,
SeongJae Park <sj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/memory_failure: constify static mm_walk_ops
Date: Mon, 18 Oct 2021 12:22:14 +0530 [thread overview]
Message-ID: <7cd5c685-834f-46ce-969d-7dfc2d1368a8@arm.com> (raw)
In-Reply-To: <20211014075042.17174-3-rikard.falkeborn@gmail.com>
On 10/14/21 1:20 PM, Rikard Falkeborn wrote:
> The only usage of hwp_walk_ops is to pass its address to
> walk_page_range() which takes a pointer to const mm_walk_ops as
> argument. Make it const to allow the compiler to put it in read-only
> memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> mm/memory-failure.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 92eeb317adf4..8d5faf347ed1 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -674,7 +674,7 @@ static int hwpoison_hugetlb_range(pte_t *ptep, unsigned long hmask,
> #define hwpoison_hugetlb_range NULL
> #endif
>
> -static struct mm_walk_ops hwp_walk_ops = {
> +static const struct mm_walk_ops hwp_walk_ops = {
> .pmd_entry = hwpoison_pte_range,
> .hugetlb_entry = hwpoison_hugetlb_range,
> };
>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
prev parent reply other threads:[~2021-10-18 6:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 7:50 [PATCH 0/2] mm: " Rikard Falkeborn
2021-10-14 7:50 ` [PATCH 1/2] mm/damon/vaddr: " Rikard Falkeborn
2021-10-14 10:29 ` SeongJae Park
2021-10-18 6:49 ` Anshuman Khandual
2021-10-14 7:50 ` [PATCH 2/2] mm/memory_failure: " Rikard Falkeborn
2021-10-15 0:47 ` Naoya Horiguchi
2021-10-18 6:52 ` Anshuman Khandual [this message]
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=7cd5c685-834f-46ce-969d-7dfc2d1368a8@arm.com \
--to=anshuman.khandual@arm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=rikard.falkeborn@gmail.com \
--cc=sj@kernel.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