tree:
https://github.com/0day-ci/linux/commits/UPDATE-20200716-153005/Nikolay-B...
head: a4695ab8c9d28c2c826e742853afa972b713f620
commit: 7a8f87bd7d0c4c97083a1efeebc8739db85575cc [2/5] btrfs: Factor out loop logic from
btrfs_free_extra_devids
config: arm-randconfig-r016-20200717 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7a8f87bd7d0c4c97083a1efeebc8739db85575cc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/btrfs/volumes.c:17:
fs/btrfs/ctree.h:2271:8: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
2271 | size_t __const btrfs_get_num_csums(void);
| ^~~~~~~
In file included from fs/btrfs/volumes.c:28:
fs/btrfs/sysfs.h:16:1: warning: type qualifiers ignored on function return type
[-Wignored-qualifiers]
16 | const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
| ^~~~~
> fs/btrfs/volumes.c:1029:6: warning: no previous prototype for
'__btrfs_free_extra_devids' [-Wmissing-prototypes]
1029 | void
__btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
vim +/__btrfs_free_extra_devids +1029 fs/btrfs/volumes.c
1026
1027
1028
1029 void __btrfs_free_extra_devids(struct btrfs_fs_devices
*fs_devices, int step,
1030 struct btrfs_device **latest_dev)
1031 {
1032 struct btrfs_device *device, *next;
1033
1034 /* This is the initialized path, it is safe to release the devices. */
1035 list_for_each_entry_safe(device, next, &fs_devices->devices, dev_list) {
1036 if (test_bit(BTRFS_DEV_STATE_IN_FS_METADATA,
1037 &device->dev_state)) {
1038 if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
1039 &device->dev_state) &&
1040 !test_bit(BTRFS_DEV_STATE_MISSING,
1041 &device->dev_state) &&
1042 (!*latest_dev ||
1043 device->generation > (*latest_dev)->generation)) {
1044 *latest_dev = device;
1045 }
1046 continue;
1047 }
1048
1049 if (device->devid == BTRFS_DEV_REPLACE_DEVID) {
1050 /*
1051 * In the first step, keep the device which has
1052 * the correct fsid and the devid that is used
1053 * for the dev_replace procedure.
1054 * In the second step, the dev_replace state is
1055 * read from the device tree and it is known
1056 * whether the procedure is really active or
1057 * not, which means whether this device is
1058 * used or whether it should be removed.
1059 */
1060 if (step == 0 || test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
1061 &device->dev_state)) {
1062 continue;
1063 }
1064 }
1065 if (device->bdev) {
1066 blkdev_put(device->bdev, device->mode);
1067 device->bdev = NULL;
1068 fs_devices->open_devices--;
1069 }
1070 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
1071 list_del_init(&device->dev_alloc_list);
1072 clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state);
1073 if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
1074 &device->dev_state))
1075 fs_devices->rw_devices--;
1076 }
1077 list_del_init(&device->dev_list);
1078 fs_devices->num_devices--;
1079 btrfs_free_device(device);
1080 }
1081
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org