linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [mmotm:master 61/139] mm/vmstat.c:1224:16: warning: 'page' may be used uninitialized in this function
@ 2017-05-19  0:07 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2017-05-19  0:07 UTC (permalink / raw)
  To: Michal Hocko
  Cc: kbuild-all, Johannes Weiner, Andrew Morton, Linux Memory Management List

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-19  0:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-19  0:07 [mmotm:master 61/139] mm/vmstat.c:1224:16: warning: 'page' may be used uninitialized in this function kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox