fs/btrfs/volumes.c:888:50: sparse: sparse: incorrect type in argument 1 (different address spaces)

2020-11-15 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   09162bc32c880a791c6c0668ce0745cf7958f576
commit: 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b btrfs: annotate device name 
rcu_string with __rcu
date:   6 weeks ago
config: s390-randconfig-s032-20201103 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d1a7aae89dc0c41ffb76fe1007dbba59d13881b
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


"sparse warnings: (new ones prefixed by >>)"
   fs/btrfs/volumes.c:374:31: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected struct rcu_string *str @@ got 
struct rcu_string [noderef] __rcu *name @@
   fs/btrfs/volumes.c:374:31: sparse: expected struct rcu_string *str
   fs/btrfs/volumes.c:374:31: sparse: got struct rcu_string [noderef] __rcu 
*name
   fs/btrfs/volumes.c:631:43: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected char const *device_path @@ got 
char [noderef] __rcu * @@
   fs/btrfs/volumes.c:631:43: sparse: expected char const *device_path
   fs/btrfs/volumes.c:631:43: sparse: got char [noderef] __rcu *
>> fs/btrfs/volumes.c:888:50: sparse: sparse: incorrect type in argument 1 
>> (different address spaces) @@ expected char const *s1 @@ got char 
>> [noderef] __rcu * @@
>> fs/btrfs/volumes.c:888:50: sparse: expected char const *s1
   fs/btrfs/volumes.c:888:50: sparse: got char [noderef] __rcu *
   fs/btrfs/volumes.c:963:39: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected struct rcu_string *str @@ got 
struct rcu_string [noderef] __rcu *name @@
   fs/btrfs/volumes.c:963:39: sparse: expected struct rcu_string *str
   fs/btrfs/volumes.c:963:39: sparse: got struct rcu_string [noderef] __rcu 
*name
   fs/btrfs/volumes.c:1018:58: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected char const *src @@ got char 
[noderef] __rcu * @@
   fs/btrfs/volumes.c:1018:58: sparse: expected char const *src
   fs/btrfs/volumes.c:1018:58: sparse: got char [noderef] __rcu *
   fs/btrfs/volumes.c:2165:49: sparse: sparse: incorrect type in argument 3 
(different address spaces) @@ expected char const *device_path @@ got 
char [noderef] __rcu * @@
   fs/btrfs/volumes.c:2165:49: sparse: expected char const *device_path
   fs/btrfs/volumes.c:2165:49: sparse: got char [noderef] __rcu *
   fs/btrfs/volumes.c:2273:41: sparse: sparse: incorrect type in argument 3 
(different address spaces) @@ expected char const *device_path @@ got 
char [noderef] __rcu * @@
   fs/btrfs/volumes.c:2273:41: sparse: expected char const *device_path
   fs/btrfs/volumes.c:2273:41: sparse: got char [noderef] __rcu *

vim +888 fs/btrfs/volumes.c

1362089d2ad7e20 Nikolay Borisov   2020-01-10  745  
1362089d2ad7e20 Nikolay Borisov   2020-01-10  746  static struct 
btrfs_fs_devices *find_fsid_reverted_metadata(
1362089d2ad7e20 Nikolay Borisov   2020-01-10  747   
struct btrfs_super_block *disk_super)
1362089d2ad7e20 Nikolay Borisov   2020-01-10  748  {
1362089d2ad7e20 Nikolay Borisov   2020-01-10  749   struct 
btrfs_fs_devices *fs_devices;
1362089d2ad7e20 Nikolay Borisov   2020-01-10  750  
1362089d2ad7e20 Nikolay Borisov   2020-01-10  751   /*
1362089d2ad7e20 Nikolay Borisov   2020-01-10  752* Handle the 
case where the scanned device is part of an fs whose last
1362089d2ad7e20 Nikolay Borisov   2020-01-10  753* metadata 
UUID change reverted it to the original FSID. At the same
1362089d2ad7e20 Nikolay Borisov   2020-01-10  754* time * 
fs_devices was first created by another constitutent device
1362089d2ad7e20 Nikolay Borisov   2020-01-10  755* which didn't 
fully observe the operation. This results in an
1362089d2ad7e20 Nikolay Borisov   2020-01-10  756* 
btrfs_fs_devices created with metadata/fsid different AND
1362089d2ad7e20 Nikolay Borisov   2020-01-10  757* 
btrfs_fs_device

fs/btrfs/volumes.c:888:50: sparse: sparse: incorrect type in argument 1 (different address spaces)

2020-10-18 Thread kernel test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   7cf726a59435301046250c42131554d9ccc566b8
commit: 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b btrfs: annotate device name 
rcu_string with __rcu
date:   12 days ago
config: s390-randconfig-s032-20201019 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-rc1-2-g368fd9ce-dirty
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d1a7aae89dc0c41ffb76fe1007dbba59d13881b
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 8d1a7aae89dc0c41ffb76fe1007dbba59d13881b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


"sparse warnings: (new ones prefixed by >>)"
   fs/btrfs/volumes.c:374:31: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected struct rcu_string *str @@ got 
struct rcu_string [noderef] __rcu *name @@
   fs/btrfs/volumes.c:374:31: sparse: expected struct rcu_string *str
   fs/btrfs/volumes.c:374:31: sparse: got struct rcu_string [noderef] __rcu 
*name
   fs/btrfs/volumes.c:631:43: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected char const *device_path @@ got 
char [noderef] __rcu * @@
   fs/btrfs/volumes.c:631:43: sparse: expected char const *device_path
   fs/btrfs/volumes.c:631:43: sparse: got char [noderef] __rcu *
>> fs/btrfs/volumes.c:888:50: sparse: sparse: incorrect type in argument 1 
>> (different address spaces) @@ expected char const *s1 @@ got char 
>> [noderef] __rcu * @@
>> fs/btrfs/volumes.c:888:50: sparse: expected char const *s1
   fs/btrfs/volumes.c:888:50: sparse: got char [noderef] __rcu *
   fs/btrfs/volumes.c:963:39: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected struct rcu_string *str @@ got 
struct rcu_string [noderef] __rcu *name @@
   fs/btrfs/volumes.c:963:39: sparse: expected struct rcu_string *str
   fs/btrfs/volumes.c:963:39: sparse: got struct rcu_string [noderef] __rcu 
*name
   fs/btrfs/volumes.c:1018:58: sparse: sparse: incorrect type in argument 1 
(different address spaces) @@ expected char const *src @@ got char 
[noderef] __rcu * @@
   fs/btrfs/volumes.c:1018:58: sparse: expected char const *src
   fs/btrfs/volumes.c:1018:58: sparse: got char [noderef] __rcu *
   fs/btrfs/volumes.c:2165:49: sparse: sparse: incorrect type in argument 3 
(different address spaces) @@ expected char const *device_path @@ got 
char [noderef] __rcu * @@
   fs/btrfs/volumes.c:2165:49: sparse: expected char const *device_path
   fs/btrfs/volumes.c:2165:49: sparse: got char [noderef] __rcu *
   fs/btrfs/volumes.c:2273:41: sparse: sparse: incorrect type in argument 3 
(different address spaces) @@ expected char const *device_path @@ got 
char [noderef] __rcu * @@
   fs/btrfs/volumes.c:2273:41: sparse: expected char const *device_path
   fs/btrfs/volumes.c:2273:41: sparse: got char [noderef] __rcu *

vim +888 fs/btrfs/volumes.c

1362089d2ad7e20 Nikolay Borisov   2020-01-10  745  
1362089d2ad7e20 Nikolay Borisov   2020-01-10  746  static struct 
btrfs_fs_devices *find_fsid_reverted_metadata(
1362089d2ad7e20 Nikolay Borisov   2020-01-10  747   
struct btrfs_super_block *disk_super)
1362089d2ad7e20 Nikolay Borisov   2020-01-10  748  {
1362089d2ad7e20 Nikolay Borisov   2020-01-10  749   struct 
btrfs_fs_devices *fs_devices;
1362089d2ad7e20 Nikolay Borisov   2020-01-10  750  
1362089d2ad7e20 Nikolay Borisov   2020-01-10  751   /*
1362089d2ad7e20 Nikolay Borisov   2020-01-10  752* Handle the 
case where the scanned device is part of an fs whose last
1362089d2ad7e20 Nikolay Borisov   2020-01-10  753* metadata 
UUID change reverted it to the original FSID. At the same
1362089d2ad7e20 Nikolay Borisov   2020-01-10  754* time * 
fs_devices was first created by another constitutent device
1362089d2ad7e20 Nikolay Borisov   2020-01-10  755* which didn't 
fully observe the operation. This results in an
1362089d2ad7e20 Nikolay Borisov   2020-01-10  756* 
btrfs_fs_devices created with metadata/fsid different AND
1362089d2ad7e20 Nikolay Borisov   2020-01-10  757* 
btrfs_fs_device