[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201612251254.Wypd5ugB%fengguang.wu@intel.com>
Date: Sun, 25 Dec 2016 12:08:04 +0800
From: kbuild test robot <fengguang.wu@...el.com>
To: Nicolas Pitre <nicolas.pitre@...aro.org>
Cc: kbuild-all@...org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Josh Triplett <josh@...htriplett.org>
Subject: drivers/net/ethernet/intel/igb/igb_ptp.c:397: warning: array
subscript is below array bounds
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba
commit: d1cbfd771ce8297fa11e89f315392de6056a2181 ptp_clock: Allow for it to be optional
date: 6 weeks ago
config: x86_64-randconfig-s1-12251102 (attached as .config)
compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7
reproduce:
git checkout d1cbfd771ce8297fa11e89f315392de6056a2181
# save the attached .config to linux build tree
make ARCH=x86_64
Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
All warnings (new ones prefixed by >>):
drivers/net/ethernet/intel/igb/igb_ptp.c: In function 'igb_ptp_feature_enable_i210':
>> drivers/net/ethernet/intel/igb/igb_ptp.c:397: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:400: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:452: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:455: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:458: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:460: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:463: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:465: warning: array subscript is below array bounds
drivers/net/ethernet/intel/igb/igb_ptp.c:467: warning: array subscript is below array bounds
vim +397 drivers/net/ethernet/intel/igb/igb_ptp.c
720db4ff Richard Cochran 2014-11-21 381 TS_SDP0_EN, TS_SDP1_EN, TS_SDP2_EN, TS_SDP3_EN,
720db4ff Richard Cochran 2014-11-21 382 };
b23c0cc5 Alexander Duyck 2015-03-06 383 struct e1000_hw *hw = &igb->hw;
720db4ff Richard Cochran 2014-11-21 384 u32 ctrl, ctrl_ext, tssdp = 0;
720db4ff Richard Cochran 2014-11-21 385
720db4ff Richard Cochran 2014-11-21 386 ctrl = rd32(E1000_CTRL);
720db4ff Richard Cochran 2014-11-21 387 ctrl_ext = rd32(E1000_CTRL_EXT);
720db4ff Richard Cochran 2014-11-21 388 tssdp = rd32(E1000_TSSDP);
720db4ff Richard Cochran 2014-11-21 389
720db4ff Richard Cochran 2014-11-21 390 igb_pin_direction(pin, 1, &ctrl, &ctrl_ext);
720db4ff Richard Cochran 2014-11-21 391
720db4ff Richard Cochran 2014-11-21 392 /* Make sure this pin is not enabled as an output. */
720db4ff Richard Cochran 2014-11-21 393 tssdp &= ~ts_sdp_en[pin];
720db4ff Richard Cochran 2014-11-21 394
720db4ff Richard Cochran 2014-11-21 395 if (chan == 1) {
720db4ff Richard Cochran 2014-11-21 396 tssdp &= ~AUX1_SEL_SDP3;
720db4ff Richard Cochran 2014-11-21 @397 tssdp |= aux1_sel_sdp[pin] | AUX1_TS_SDP_EN;
720db4ff Richard Cochran 2014-11-21 398 } else {
720db4ff Richard Cochran 2014-11-21 399 tssdp &= ~AUX0_SEL_SDP3;
720db4ff Richard Cochran 2014-11-21 400 tssdp |= aux0_sel_sdp[pin] | AUX0_TS_SDP_EN;
720db4ff Richard Cochran 2014-11-21 401 }
720db4ff Richard Cochran 2014-11-21 402
720db4ff Richard Cochran 2014-11-21 403 wr32(E1000_TSSDP, tssdp);
720db4ff Richard Cochran 2014-11-21 404 wr32(E1000_CTRL, ctrl);
720db4ff Richard Cochran 2014-11-21 405 wr32(E1000_CTRL_EXT, ctrl_ext);
:::::: The code at line 397 was first introduced by commit
:::::: 720db4ffd0846570c1ddc82e7bb661ab0a676fad igb: enable auxiliary PHC functions for the i210
:::::: TO: Richard Cochran <richardcochran@...il.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (25309 bytes)
Powered by blists - more mailing lists