linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: "Jérôme Glisse" <jglisse@redhat.com>
Cc: kbuild-all@01.org, Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: [mmotm:master 110/211] mm/madvise.c:341:4: note: in expansion of macro 'free_swap_and_cache'
Date: Fri, 17 Mar 2017 09:04:12 +0800	[thread overview]
Message-ID: <201703170906.LVH10Vhx%fengguang.wu@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2943 bytes --]

tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   8276ddb3c638602509386f1a05f75326dbf5ce09
commit: 4ec7a28189776a031d4e7f8ee8581c0db9f96847 [110/211] mm/ZONE_DEVICE/unaddressable: add support for un-addressable device memory
config: i386-randconfig-s0-201711 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout 4ec7a28189776a031d4e7f8ee8581c0db9f96847
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from mm/madvise.c:22:0:
   mm/madvise.c: In function 'madvise_free_pte_range':
   include/linux/swap.h:450:55: warning: value computed is not used [-Wunused-value]
    #define free_swap_and_cache(e) (is_migration_entry(e) || is_device_entry(e))
                                                          ^
>> mm/madvise.c:341:4: note: in expansion of macro 'free_swap_and_cache'
       free_swap_and_cache(entry);
       ^~~~~~~~~~~~~~~~~~~

vim +/free_swap_and_cache +341 mm/madvise.c

854e9ed0 Minchan Kim 2016-01-15  325  		ptent = *pte;
854e9ed0 Minchan Kim 2016-01-15  326  
64b42bc1 Minchan Kim 2016-01-15  327  		if (pte_none(ptent))
854e9ed0 Minchan Kim 2016-01-15  328  			continue;
64b42bc1 Minchan Kim 2016-01-15  329  		/*
64b42bc1 Minchan Kim 2016-01-15  330  		 * If the pte has swp_entry, just clear page table to
64b42bc1 Minchan Kim 2016-01-15  331  		 * prevent swap-in which is more expensive rather than
64b42bc1 Minchan Kim 2016-01-15  332  		 * (page allocation + zeroing).
64b42bc1 Minchan Kim 2016-01-15  333  		 */
64b42bc1 Minchan Kim 2016-01-15  334  		if (!pte_present(ptent)) {
64b42bc1 Minchan Kim 2016-01-15  335  			swp_entry_t entry;
64b42bc1 Minchan Kim 2016-01-15  336  
64b42bc1 Minchan Kim 2016-01-15  337  			entry = pte_to_swp_entry(ptent);
64b42bc1 Minchan Kim 2016-01-15  338  			if (non_swap_entry(entry))
64b42bc1 Minchan Kim 2016-01-15  339  				continue;
64b42bc1 Minchan Kim 2016-01-15  340  			nr_swap--;
64b42bc1 Minchan Kim 2016-01-15 @341  			free_swap_and_cache(entry);
64b42bc1 Minchan Kim 2016-01-15  342  			pte_clear_not_present_full(mm, addr, pte, tlb->fullmm);
64b42bc1 Minchan Kim 2016-01-15  343  			continue;
64b42bc1 Minchan Kim 2016-01-15  344  		}
854e9ed0 Minchan Kim 2016-01-15  345  
854e9ed0 Minchan Kim 2016-01-15  346  		page = vm_normal_page(vma, addr, ptent);
854e9ed0 Minchan Kim 2016-01-15  347  		if (!page)
854e9ed0 Minchan Kim 2016-01-15  348  			continue;
854e9ed0 Minchan Kim 2016-01-15  349  

:::::: The code at line 341 was first introduced by commit
:::::: 64b42bc1cfdf6e2c3ab7315f2ff56c31cd257370 mm/madvise.c: free swp_entry in madvise_free

:::::: TO: Minchan Kim <minchan@kernel.org>
:::::: CC: Linus Torvalds <torvalds@linux-foundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27258 bytes --]

                 reply	other threads:[~2017-03-17  1:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201703170906.LVH10Vhx%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=jglisse@redhat.com \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.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