linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yang Shi <shy828301@gmail.com>
To: Kai Song <songkai01@inspur.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/vmscan.c:Fix -Wunused-but-set-variable warning
Date: Mon, 27 Sep 2021 09:51:03 -0700	[thread overview]
Message-ID: <CAHbLzkopfWZhT0f2D3VjUPyssDLO++zMqR+2qPbWNhkg0mUQ0A@mail.gmail.com> (raw)
In-Reply-To: <20210924181218.21165-1-songkai01@inspur.com>

On Sun, Sep 26, 2021 at 1:36 AM Kai Song <songkai01@inspur.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@inspur.com>

Reviewed-by: Yang Shi <shy828301@gmail.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
>
>


      reply	other threads:[~2021-09-27 16:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 18:12 [PATCH] mm/vmscan.c:Fix -Wunused-but-set-variable warning Kai Song
2021-09-27 16:51 ` Yang Shi [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=CAHbLzkopfWZhT0f2D3VjUPyssDLO++zMqR+2qPbWNhkg0mUQ0A@mail.gmail.com \
    --to=shy828301@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=songkai01@inspur.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).