[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHbLzkopfWZhT0f2D3VjUPyssDLO++zMqR+2qPbWNhkg0mUQ0A@mail.gmail.com>
Date: Mon, 27 Sep 2021 09:51:03 -0700
From: Yang Shi <shy828301@...il.com>
To: Kai Song <songkai01@...pur.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/vmscan.c:Fix -Wunused-but-set-variable warning
On Sun, Sep 26, 2021 at 1:36 AM Kai Song <songkai01@...pur.com> wrote:
>
> We fix the following warning when building kernel with W=1:
> mm/vmscan.c:1362:6: warning: variable 'err' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Kai Song <songkai01@...pur.com>
Reviewed-by: Yang Shi <shy828301@...il.com>
> ---
> mm/vmscan.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index f8b43f131673..7cf702bc1959 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -1359,7 +1359,6 @@ static unsigned int demote_page_list(struct list_head *demote_pages,
> {
> int target_nid = next_demotion_node(pgdat->node_id);
> unsigned int nr_succeeded;
> - int err;
>
> if (list_empty(demote_pages))
> return 0;
> @@ -1368,7 +1367,7 @@ static unsigned int demote_page_list(struct list_head *demote_pages,
> return 0;
>
> /* Demotion ignores all cpuset and mempolicy settings */
> - err = migrate_pages(demote_pages, alloc_demote_page, NULL,
> + migrate_pages(demote_pages, alloc_demote_page, NULL,
> target_nid, MIGRATE_ASYNC, MR_DEMOTION,
> &nr_succeeded);
>
> --
> 2.27.0
>
>
Powered by blists - more mailing lists