linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Michal Hocko <mhocko@suse.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 61/139] mm/vmstat.c:1224:16: warning: 'page' may be used uninitialized in this function
Date: Fri, 19 May 2017 08:07:50 +0800	[thread overview]
Message-ID: <201705190838.ml4NqEwp%fengguang.wu@intel.com> (raw)

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

tree:   git://git.cmpxchg.org/linux-mmotm.git master
head:   ecfddce33be51ebedf97f1e03d954c14e575afb6
commit: d9f7aec054d6fdbf8f9c4f37c269bf7fff4c04bd [61/139] mm, vmstat: skip reporting offline pages in pagetypeinfo
config: i386-defconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout d9f7aec054d6fdbf8f9c4f37c269bf7fff4c04bd
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   mm/vmstat.c: In function 'pagetypeinfo_showblockcount_print':
>> mm/vmstat.c:1224:16: warning: 'page' may be used uninitialized in this function [-Wmaybe-uninitialized]
      struct page *page;
                   ^~~~

vim +/page +1224 mm/vmstat.c

467c996c Mel Gorman     2007-10-16  1208  
b2bd8598 David Rientjes 2017-05-03  1209  	walk_zones_in_node(m, pgdat, true, pagetypeinfo_showfree_print);
467c996c Mel Gorman     2007-10-16  1210  
467c996c Mel Gorman     2007-10-16  1211  	return 0;
467c996c Mel Gorman     2007-10-16  1212  }
467c996c Mel Gorman     2007-10-16  1213  
467c996c Mel Gorman     2007-10-16  1214  static void pagetypeinfo_showblockcount_print(struct seq_file *m,
467c996c Mel Gorman     2007-10-16  1215  					pg_data_t *pgdat, struct zone *zone)
467c996c Mel Gorman     2007-10-16  1216  {
467c996c Mel Gorman     2007-10-16  1217  	int mtype;
467c996c Mel Gorman     2007-10-16  1218  	unsigned long pfn;
467c996c Mel Gorman     2007-10-16  1219  	unsigned long start_pfn = zone->zone_start_pfn;
108bcc96 Cody P Schafer 2013-02-22  1220  	unsigned long end_pfn = zone_end_pfn(zone);
467c996c Mel Gorman     2007-10-16  1221  	unsigned long count[MIGRATE_TYPES] = { 0, };
467c996c Mel Gorman     2007-10-16  1222  
467c996c Mel Gorman     2007-10-16  1223  	for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
467c996c Mel Gorman     2007-10-16 @1224  		struct page *page;
467c996c Mel Gorman     2007-10-16  1225  
d9f7aec0 Michal Hocko   2017-05-18  1226  		if (!pfn_to_online_page(pfn))
467c996c Mel Gorman     2007-10-16  1227  			continue;
467c996c Mel Gorman     2007-10-16  1228  
eb33575c Mel Gorman     2009-05-13  1229  		/* Watch for unexpected holes punched in the memmap */
eb33575c Mel Gorman     2009-05-13  1230  		if (!memmap_valid_within(pfn, page, zone))
e80d6a24 Mel Gorman     2008-08-14  1231  			continue;
eb33575c Mel Gorman     2009-05-13  1232  

:::::: The code at line 1224 was first introduced by commit
:::::: 467c996c1e1910633fa8e7adc9b052aa3ed5f97c Print out statistics in relation to fragmentation avoidance to /proc/pagetypeinfo

:::::: TO: Mel Gorman <mel@csn.ul.ie>
:::::: CC: Linus Torvalds <torvalds@woody.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: 26204 bytes --]

                 reply	other threads:[~2017-05-19  0:08 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=201705190838.ml4NqEwp%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.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