[nfs:testing 16/18] fs//nfs/proc.c:597:27: warning: suggest parentheses around '&&' within '||'

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

 



tree:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git testing
head:   a21b5ffadc8276bc5a7be22dbb96129a47bbd249
commit: 63ca4f83bffe058abb445ae7a37614305c00c1e0 [16/18] NFSv2: Fix eof handling
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
        git checkout 63ca4f83bffe058abb445ae7a37614305c00c1e0
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   fs//nfs/proc.c: In function 'nfs_read_done':
>> fs//nfs/proc.c:597:27: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
      if (hdr->res.count == 0 && hdr->args.count > 0 ||
          ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

vim +597 fs//nfs/proc.c

   586	
   587	static int nfs_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr)
   588	{
   589		struct inode *inode = hdr->inode;
   590	
   591		nfs_invalidate_atime(inode);
   592		if (task->tk_status >= 0) {
   593			nfs_refresh_inode(inode, hdr->res.fattr);
   594			/* Emulate the eof flag, which isn't normally needed in NFSv2
   595			 * as it is guaranteed to always return the file attributes
   596			 */
 > 597			if (hdr->res.count == 0 && hdr->args.count > 0 ||
   598			    hdr->args.offset + hdr->res.count >= hdr->res.fattr->size)
   599				hdr->res.eof = 1;
   600		}
   601		return 0;
   602	}
   603	

---
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 Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux