Re: [PATCH 3/6] scsi: target: core: dynamic opcode support in RSOC

kernel test robot
2022-07-19T13:25:42Z

Hi Dmitry,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next linus/master v5.19-rc7 next-20220719]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Dmitry-Bogdanov/add-support-of-RSOC-command/20220718-200622
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: nios2-randconfig-s042-20220718 (https://download.01.org/0day-ci/archive/20220719/202207192030.yfVYkp2d-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://github.com/intel-lab-lkp/linux/commit/5aa6c10f37c99c3321ff7675ffbb6fea99219263
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dmitry-Bogdanov/add-support-of-RSOC-command/20220718-200622
git checkout 5aa6c10f37c99c3321ff7675ffbb6fea99219263
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=nios2 SHELL=/bin/bash drivers/target/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

sparse warnings: (new ones prefixed by >>)
>> drivers/target/target_core_spc.c:1927:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct t10_alua_tg_pt_gp *l_tg_pt_gp @@ got struct t10_alua_tg_pt_gp [noderef] __rcu *lun_tg_pt_gp @@
drivers/target/target_core_spc.c:1927:20: sparse: expected struct t10_alua_tg_pt_gp *l_tg_pt_gp
drivers/target/target_core_spc.c:1927:20: sparse: got struct t10_alua_tg_pt_gp [noderef] __rcu *lun_tg_pt_gp
drivers/target/target_core_spc.c:2159:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected int ret @@ got restricted sense_reason_t @@
drivers/target/target_core_spc.c:2159:21: sparse: expected int ret
drivers/target/target_core_spc.c:2159:21: sparse: got restricted sense_reason_t
drivers/target/target_core_spc.c:2166:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected int ret @@ got restricted sense_reason_t @@
drivers/target/target_core_spc.c:2166:21: sparse: expected int ret
drivers/target/target_core_spc.c:2166:21: sparse: got restricted sense_reason_t
drivers/target/target_core_spc.c:2178:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected int ret @@ got restricted sense_reason_t @@
drivers/target/target_core_spc.c:2178:21: sparse: expected int ret
drivers/target/target_core_spc.c:2178:21: sparse: got restricted sense_reason_t
drivers/target/target_core_spc.c:2207:16: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted sense_reason_t @@ got int ret @@
drivers/target/target_core_spc.c:2207:16: sparse: expected restricted sense_reason_t
drivers/target/target_core_spc.c:2207:16: sparse: got int ret

vim +1927 drivers/target/target_core_spc.c

1920
1921 static bool tcm_is_set_tpg_enabled(struct se_cmd *cmd)
1922 {
1923 struct t10_alua_tg_pt_gp *l_tg_pt_gp;
1924 struct se_lun *l_lun = cmd->se_lun;
1925
1926 spin_lock(&l_lun->lun_tg_pt_gp_lock);
> 1927 l_tg_pt_gp = l_lun->lun_tg_pt_gp;
1928 if (!l_tg_pt_gp) {
1929 spin_unlock(&l_lun->lun_tg_pt_gp_lock);
1930 return false;
1931 }
1932 if (!(l_tg_pt_gp->tg_pt_gp_alua_access_type & TPGS_EXPLICIT_ALUA)) {
1933 spin_unlock(&l_lun->lun_tg_pt_gp_lock);
1934 return false;
1935 }
1936 spin_unlock(&l_lun->lun_tg_pt_gp_lock);
1937
1938 return true;
1939 }
1940

--
0-DAY CI Kernel Test Service