All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fengguang Wu <fengguang.wu@intel.com>
To: wenxiong@linux.vnet.ibm.com
Cc: linux-scsi@vger.kernel.org, James Bottomley <JBottomley@Parallels.com>
Subject: Re: [scsi:for-next 11/19] drivers/scsi/ipr.c:8700:16: warning: array subscript is above array bounds
Date: Thu, 3 Jan 2013 18:16:36 +0800	[thread overview]
Message-ID: <20130103101636.GA13994@localhost> (raw)
In-Reply-To: <20130102190547.Horde.PyZzqJir309Q5Mtbh-Z1Y7A@imap.linux.ibm.com>

Hi Wendy,

On Wed, Jan 02, 2013 at 07:05:47PM -0500, wenxiong@linux.vnet.ibm.com wrote:
> Hi Fengguang,
> 
> We built 32bit kernel for "current jejb for-next tree" on x86
> platform by using your config file. Seems We couldn't reproduce the
> error in our environment. What options you use to make 32bit kernel?
> We used:
> 
> make ARCH=i386 V=1 -Wall.
> 
> Also can you reproduce this with current jejb for-next tree in your
> environment?

Yes I can reproduce the warning at commit
7af0de314b738e26bf4d49a6f30d00ce56343107 as well as
7ff768a5feade4fa51f038d97b7eb9f72152b7c1.

I'm running gcc 4.6.3 and 4.7.2, the reproduce command line is:

        make ARCH=i386 drivers/scsi/ipr.o

Thanks,
Fengguang

> Quoting kbuild test robot <fengguang.wu@intel.com>:
> 
> >tree:   git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
> >head:   7ff768a5feade4fa51f038d97b7eb9f72152b7c1
> >commit: 7af0de314b738e26bf4d49a6f30d00ce56343107 [11/19] [SCSI]
> >ipr: Add support for MSI-X and distributed completion
> >config: i386-randconfig-x243 (attached as .config)
> >
> >All warnings:
> >
> >drivers/scsi/ipr.c: In function 'ipr_probe':
> >drivers/scsi/ipr.c:8700:16: warning: array subscript is above
> >array bounds [-Warray-bounds]
> >
> >vim +8700 drivers/scsi/ipr.c
> >
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8684
> >				ioa_cfg->hrrq[i].min_cmd_id =
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8685
> >					IPR_NUM_INTERNAL_CMD_BLKS +
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8686  					(i -
> >1) * entries_each_hrrq;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8687
> >				ioa_cfg->hrrq[i].max_cmd_id =
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8688
> >					(IPR_NUM_INTERNAL_CMD_BLKS +
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8689  					i *
> >entries_each_hrrq - 1);
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8690  			}
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8691  		} else {
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8692
> >			entries_each_hrrq = IPR_NUM_CMD_BLKS;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8693
> >			ioa_cfg->hrrq[i].min_cmd_id = 0;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8694
> >			ioa_cfg->hrrq[i].max_cmd_id = (entries_each_hrrq - 1);
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8695  		}
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8696
> >		ioa_cfg->hrrq[i].size = entries_each_hrrq;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8697  	}
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8698
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8699  	i =
> >IPR_NUM_CMD_BLKS -
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03 @8700
> >		ioa_cfg->hrrq[ioa_cfg->hrrq_num - 1].max_cmd_id - 1;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8701  	if (i > 0) {
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8702
> >		ioa_cfg->hrrq[ioa_cfg->hrrq_num - 1].size += i;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8703
> >		ioa_cfg->hrrq[ioa_cfg->hrrq_num - 1].max_cmd_id += i;
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8704  	}
> >7af0de31 wenxiong@linux.vnet.ibm.com 2012-12-03  8705
> >^1da177e Linus Torvalds              2005-04-16  8706  	for (i =
> >0; i < IPR_NUM_CMD_BLKS; i++) {
> >203fa3fe Kleber Sacilotto de Souza   2012-08-22  8707  		ipr_cmd =
> >pci_pool_alloc(ioa_cfg->ipr_cmd_pool, GFP_KERNEL, &dma_addr);
> >^1da177e Linus Torvalds              2005-04-16  8708
> >
> >---
> >0-DAY kernel build testing backend         Open Source Technology Center
> >Fengguang Wu, Yuanhan Liu                              Intel Corporation
> 
> 

      reply	other threads:[~2013-01-03 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 11:20 [scsi:for-next 11/19] drivers/scsi/ipr.c:8700:16: warning: array subscript is above array bounds kbuild test robot
2013-01-03  0:05 ` wenxiong
2013-01-03 10:16   ` Fengguang Wu [this message]

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=20130103101636.GA13994@localhost \
    --to=fengguang.wu@intel.com \
    --cc=JBottomley@Parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=wenxiong@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.