[ceph:wip-fsmap-decode 9/9] fs/ceph/mdsmap.c:380:2: warning: 'return' with a value, in function returning void

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

 



tree:   https://github.com/ceph/ceph-client.git wip-fsmap-decode
head:   0304b4fb0cadd0c6a953d7842c1e704c5f24fe3f
commit: 0304b4fb0cadd0c6a953d7842c1e704c5f24fe3f [9/9] ceph: decode full mdsmap/fsmap
config: sparc64-allyesconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 0304b4fb0cadd0c6a953d7842c1e704c5f24fe3f
        # save the attached .config to linux build tree
        make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   fs/ceph/mdsmap.c: In function 'ceph_fsmap_decode':
>> fs/ceph/mdsmap.c:380:2: warning: 'return' with a value, in function returning void
     return 0;
     ^
   fs/ceph/mdsmap.c:386:2: warning: 'return' with a value, in function returning void
     return -EINVAL;
     ^

vim +/return +380 fs/ceph/mdsmap.c

   364				ceph_decode_need(p, end, cur_len, bad);
   365				fs_end = *p + cur_len;
   366				fs_p = *p;
   367				*p = fs_end;
   368	
   369				ceph_decode_need(&fs_p, end, sizeof(32) * 2, bad);
   370				fscid = ceph_decode_32(&fs_p);
   371				cur_len = ceph_decode_32(&fs_p);
   372				ceph_decode_need(&fs_p, fs_end, cur_len, bad);
   373				bl_end = fs_p + cur_len;
   374				bl_p = fs_p;
   375				fs_p = bl_end;
   376	
   377				mdsmap = ceph_mdsmap_decode(&bl_p, bl_end);
   378			}
   379		}
 > 380		return 0;
   381	bad:
   382		pr_err("corrupt fsmap\n");
   383		print_hex_dump(KERN_DEBUG, "fsmap: ",
   384			       DUMP_PREFIX_OFFSET, 16, 1,
   385			       start, end - start, true);
   386		return -EINVAL;
   387	}
   388	

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux