All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [next:akpm 146/246] mm/migrate.c:827:5: warning: 'ttu_flags' may be used uninitialized in this f
Date: Fri, 07 Sep 2012 21:36:53 +0000	[thread overview]
Message-ID: <20120907143653.554c4a2b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20120907112607.GA21965@localhost>

On Fri, 7 Sep 2012 19:26:07 +0800
Fengguang Wu <fengguang.wu@intel.com> wrote:

> Hi Minchan,
> 
> FYI, there are new compile warnings show up in
> 
> tree:   git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
> head:   d28e1f373a79e532eecbe6b17beeb4d2052c1a52
> commit: 29cfd54de3204fe1b8b6a4ea744a21b43f3e00fa [146/246] mm: support MIGRATE_DISCARD
> config: i386-randconfig-k920 (attached as .config)
> 
> All error/warnings:
> 
> mm/migrate.c: In function 'migrate_pages':
> mm/migrate.c:827:5: warning: 'ttu_flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
> mm/migrate.c:701:17: note: 'ttu_flags' was declared here
> 
> vim +827 mm/migrate.c
>    817	
>    818		file = page_is_file_cache(page);
>    819		ttu_flags = TTU_IGNORE_ACCESS;
>    820	retry:
>    821		if (!(mode & MIGRATE_DISCARD) || !file || PageDirty(page))
>    822			ttu_flags |= (TTU_MIGRATION | TTU_IGNORE_MLOCK);
>    823		else
>    824			discard_mode = true;
>    825	
>    826		/* Establish migration ptes or remove ptes */
>  > 827		rc = try_to_unmap(page, ttu_flags);
>    828	
>    829	skip_unmap:
>    830		if (rc = SWAP_SUCCESS) {
>    831			if (!discard_mode) {
>    832				rc = move_to_new_page(newpage, page,
>    833						remap_swapcache, mode);
>    834			} else {
>    835				rc = discard_page(page);
>    836				goto uncharge;
>    837			}

yup, that's a bug.  I dropped the patch.

  reply	other threads:[~2012-09-07 21:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07 11:26 [next:akpm 146/246] mm/migrate.c:827:5: warning: 'ttu_flags' may be used uninitialized in this funct Fengguang Wu
2012-09-07 21:36 ` Andrew Morton [this message]
2012-09-11 23:57 ` [next:akpm 146/246] mm/migrate.c:827:5: warning: 'ttu_flags' may be used uninitialized in this f Minchan Kim

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=20120907143653.554c4a2b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=kernel-janitors@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.