mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <fengguang.wu@intel.com>
To: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Josh Triplett <josh@joshtriplett.org>
Subject: drivers/net/ethernet/intel/igb/igb_ptp.c:397: warning: array subscript is below array bounds
Date: Sun, 25 Dec 2016 12:08:04 +0800	[thread overview]
Message-ID: <201612251254.Wypd5ugB%fengguang.wu@intel.com> (raw)

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

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@gmail.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

---
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: 25309 bytes --]

                 reply	other threads:[~2016-12-25  4: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=201612251254.Wypd5ugB%fengguang.wu@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=josh@joshtriplett.org \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®