linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Josef Bacik <jbacik@fb.com>
Cc: kbuild-all@01.org, linux-btrfs@vger.kernel.org
Subject: [josef-btrfs:master 3/11] mm/vmstat.c:1445:4: warning: iteration 28u invokes undefined behavior
Date: Fri, 21 Oct 2016 07:00:49 +0800	[thread overview]
Message-ID: <201610210718.uRGg2mMX%fengguang.wu@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git master
head:   570b2b152bf32db746eb6de1a144491b5f7ca34f
commit: 3bfb81930e877c80af87a9954ca5714aa6ae60ee [3/11] writeback: allow for dirty metadata accounting
config: x86_64-randconfig-i0-201642 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        git checkout 3bfb81930e877c80af87a9954ca5714aa6ae60ee
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   mm/vmstat.c: In function 'zoneinfo_show_print':
>> mm/vmstat.c:1445:4: warning: iteration 28u invokes undefined behavior [-Waggressive-loop-optimizations]
       seq_printf(m, "\n      %-12s %lu",
       ^
   mm/vmstat.c:1444:3: note: containing loop
      for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) {
      ^

vim +1445 mm/vmstat.c

e2ecc8a7 Mel Gorman        2016-07-28  1429  			return zone == compare;
e2ecc8a7 Mel Gorman        2016-07-28  1430  	}
e2ecc8a7 Mel Gorman        2016-07-28  1431  
e2ecc8a7 Mel Gorman        2016-07-28  1432  	/* The zone must be somewhere! */
e2ecc8a7 Mel Gorman        2016-07-28  1433  	WARN_ON_ONCE(1);
e2ecc8a7 Mel Gorman        2016-07-28  1434  	return false;
e2ecc8a7 Mel Gorman        2016-07-28  1435  }
e2ecc8a7 Mel Gorman        2016-07-28  1436  
467c996c Mel Gorman        2007-10-16  1437  static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat,
467c996c Mel Gorman        2007-10-16  1438  							struct zone *zone)
f6ac2354 Christoph Lameter 2006-06-30  1439  {
f6ac2354 Christoph Lameter 2006-06-30  1440  	int i;
f6ac2354 Christoph Lameter 2006-06-30  1441  	seq_printf(m, "Node %d, zone %8s", pgdat->node_id, zone->name);
e2ecc8a7 Mel Gorman        2016-07-28  1442  	if (is_zone_first_populated(pgdat, zone)) {
e2ecc8a7 Mel Gorman        2016-07-28  1443  		seq_printf(m, "\n  per-node stats");
e2ecc8a7 Mel Gorman        2016-07-28  1444  		for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) {
e2ecc8a7 Mel Gorman        2016-07-28 @1445  			seq_printf(m, "\n      %-12s %lu",
e2ecc8a7 Mel Gorman        2016-07-28  1446  				vmstat_text[i + NR_VM_ZONE_STAT_ITEMS],
e2ecc8a7 Mel Gorman        2016-07-28  1447  				node_page_state(pgdat, i));
e2ecc8a7 Mel Gorman        2016-07-28  1448  		}
e2ecc8a7 Mel Gorman        2016-07-28  1449  	}
f6ac2354 Christoph Lameter 2006-06-30  1450  	seq_printf(m,
f6ac2354 Christoph Lameter 2006-06-30  1451  		   "\n  pages free     %lu"
f6ac2354 Christoph Lameter 2006-06-30  1452  		   "\n        min      %lu"
f6ac2354 Christoph Lameter 2006-06-30  1453  		   "\n        low      %lu"

:::::: The code at line 1445 was first introduced by commit
:::::: e2ecc8a79ed49f7838b4fdf352c4c48cec9424ac mm, vmstat: print node-based stats in zoneinfo file

:::::: TO: Mel Gorman <mgorman@techsingularity.net>
:::::: 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: 24366 bytes --]

                 reply	other threads:[~2016-10-20 23:01 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=201610210718.uRGg2mMX%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=jbacik@fb.com \
    --cc=kbuild-all@01.org \
    --cc=linux-btrfs@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 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).