From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Cai Huoqing <cai.huoqing@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Peter Xu <peterx@redhat.com>, Yang Shi <shy828301@gmail.com>,
David Hildenbrand <david@redhat.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Axel Rasmussen <axelrasmussen@google.com>,
Colin Cross <ccross@google.com>,
Alistair Popple <apopple@nvidia.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs/proc: task_mmu.c: Fix the error-unused variable 'migration'
Date: Wed, 9 Feb 2022 13:53:33 +1100 [thread overview]
Message-ID: <20220209135333.7975a407@canb.auug.org.au> (raw)
In-Reply-To: <20220209023602.21929-1-cai.huoqing@linux.dev>
[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]
Hi Cai,
On Wed, 9 Feb 2022 10:35:59 +0800 Cai Huoqing <cai.huoqing@linux.dev> wrote:
>
> Avoid the error-unused variable 'migration' when
> CONFIG_TRANSPARENT_HUGEPAGE and CONFIG_ARCH_ENABLE_THP_MIGRATION
> are not enabled.
>
> Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev>
> ---
> fs/proc/task_mmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index bc2f46033231..b055ff29204d 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1441,7 +1441,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
> spinlock_t *ptl;
> pte_t *pte, *orig_pte;
> int err = 0;
> - bool migration = false;
> + bool migration __maybe_unused = false;
>
> #ifdef CONFIG_TRANSPARENT_HUGEPAGE
> ptl = pmd_trans_huge_lock(pmdp, vma);
> --
> 2.25.1
>
This has already been fixed in Andrew's patch set by moving the "#ifdef
CONFIG_TRANSPARENT_HUGEPAGE" above the "migration" declaration.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2022-02-09 3:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-09 2:35 [PATCH] fs/proc: task_mmu.c: Fix the error-unused variable 'migration' Cai Huoqing
2022-02-09 2:53 ` Stephen Rothwell [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=20220209135333.7975a407@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=axelrasmussen@google.com \
--cc=cai.huoqing@linux.dev \
--cc=ccross@google.com \
--cc=david@redhat.com \
--cc=linmiaohe@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=shy828301@gmail.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).