Re: [PATCH 1/2] IB/rxe: Remove unneeded check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Yuval,

[auto build test WARNING on rdma/master]
[also build test WARNING on v4.13-rc1 next-20170721]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Yuval-Shaia/IB-rxe-Remove-unneeded-check/20170723-111722
base:   https://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=xtensa 

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 >>):

   drivers/infiniband/sw/rxe/rxe_av.c: In function 'rxe_av_chk_attr':
>> drivers/infiniband/sw/rxe/rxe_av.c:44:30: warning: 'port' may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (sgid_index > port->attr.gid_tbl_len) {
                                 ^

vim +/port +44 drivers/infiniband/sw/rxe/rxe_av.c

8700e3e7 Moni Shoua                  2016-06-16  36  
90898850 Dasaratharaman Chandramouli 2017-04-29  37  int rxe_av_chk_attr(struct rxe_dev *rxe, struct rdma_ah_attr *attr)
8700e3e7 Moni Shoua                  2016-06-16  38  {
8700e3e7 Moni Shoua                  2016-06-16  39  	struct rxe_port *port;
8700e3e7 Moni Shoua                  2016-06-16  40  
d8966fcd Dasaratharaman Chandramouli 2017-04-29  41  	if (rdma_ah_get_ah_flags(attr) & IB_AH_GRH) {
d8966fcd Dasaratharaman Chandramouli 2017-04-29  42  		u8 sgid_index = rdma_ah_read_grh(attr)->sgid_index;
d8966fcd Dasaratharaman Chandramouli 2017-04-29  43  
d8966fcd Dasaratharaman Chandramouli 2017-04-29 @44  		if (sgid_index > port->attr.gid_tbl_len) {
d8966fcd Dasaratharaman Chandramouli 2017-04-29  45  			pr_info("invalid sgid index = %d\n", sgid_index);
8700e3e7 Moni Shoua                  2016-06-16  46  			return -EINVAL;
8700e3e7 Moni Shoua                  2016-06-16  47  		}
8700e3e7 Moni Shoua                  2016-06-16  48  	}
8700e3e7 Moni Shoua                  2016-06-16  49  
8700e3e7 Moni Shoua                  2016-06-16  50  	return 0;
8700e3e7 Moni Shoua                  2016-06-16  51  }
8700e3e7 Moni Shoua                  2016-06-16  52  

:::::: The code at line 44 was first introduced by commit
:::::: d8966fcd4c25708c3a76ea7619644218373df639 IB/core: Use rdma_ah_attr accessor functions

:::::: TO: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@xxxxxxxxx>
:::::: CC: Doug Ledford <dledford@xxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux