Re: [PATCH] ipr: Remove SATA support

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

 



Hi Brian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on jejb-scsi/for-next]
[also build test WARNING on mkp-scsi/for-next linus/master v6.3-rc6 next-20230412]
[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/Brian-King/ipr-Remove-SATA-support/20230413-014213
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
patch link:    https://lore.kernel.org/r/20230412174015.114764-1-brking%40linux.vnet.ibm.com
patch subject: [PATCH] ipr: Remove SATA support
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20230413/202304130720.QuKga8rs-lkp@xxxxxxxxx/config)
compiler: riscv64-linux-gcc (GCC) 12.1.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
        # https://github.com/intel-lab-lkp/linux/commit/3562ad7d350c7c5b3f13508ef3323b1239de71e2
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Brian-King/ipr-Remove-SATA-support/20230413-014213
        git checkout 3562ad7d350c7c5b3f13508ef3323b1239de71e2
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304130720.QuKga8rs-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   drivers/scsi/ipr.c: In function 'ipr_init_res_entry':
>> drivers/scsi/ipr.c:1104:22: warning: variable 'proto' set but not used [-Wunused-but-set-variable]
    1104 |         unsigned int proto;
         |                      ^~~~~
   drivers/scsi/ipr.c: In function 'ipr_update_res_entry':
   drivers/scsi/ipr.c:1261:22: warning: variable 'proto' set but not used [-Wunused-but-set-variable]
    1261 |         unsigned int proto;
         |                      ^~~~~
   drivers/scsi/ipr.c: In function 'ipr_change_queue_depth':
>> drivers/scsi/ipr.c:4417:36: warning: variable 'res' set but not used [-Wunused-but-set-variable]
    4417 |         struct ipr_resource_entry *res;
         |                                    ^~~


vim +/proto +1104 drivers/scsi/ipr.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  1091  
^1da177e4c3f41 Linus Torvalds 2005-04-16  1092  /**
^1da177e4c3f41 Linus Torvalds 2005-04-16  1093   * ipr_init_res_entry - Initialize a resource entry struct.
^1da177e4c3f41 Linus Torvalds 2005-04-16  1094   * @res:	resource entry struct
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1095   * @cfgtew:	config table entry wrapper struct
^1da177e4c3f41 Linus Torvalds 2005-04-16  1096   *
^1da177e4c3f41 Linus Torvalds 2005-04-16  1097   * Return value:
^1da177e4c3f41 Linus Torvalds 2005-04-16  1098   * 	none
^1da177e4c3f41 Linus Torvalds 2005-04-16  1099   **/
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1100  static void ipr_init_res_entry(struct ipr_resource_entry *res,
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1101  			       struct ipr_config_table_entry_wrapper *cfgtew)
^1da177e4c3f41 Linus Torvalds 2005-04-16  1102  {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1103  	int found = 0;
3e7ebdfa58ddae Wayne Boyer    2010-02-19 @1104  	unsigned int proto;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1105  	struct ipr_ioa_cfg *ioa_cfg = res->ioa_cfg;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1106  	struct ipr_resource_entry *gscsi_res = NULL;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1107  
ee0a90fa3efffc Brian King     2005-11-01  1108  	res->needs_sync_complete = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  1109  	res->in_erp = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  1110  	res->add_to_ml = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  1111  	res->del_from_ml = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  1112  	res->resetting_device = 0;
0b1f8d445b8cc5 Wendy Xiong    2014-01-21  1113  	res->reset_occurred = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  1114  	res->sdev = NULL;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1115  
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1116  	if (ioa_cfg->sis64) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1117  		proto = cfgtew->u.cfgte64->proto;
359d96e73cea0e Brian King     2015-06-11  1118  		res->flags = be16_to_cpu(cfgtew->u.cfgte64->flags);
359d96e73cea0e Brian King     2015-06-11  1119  		res->res_flags = be16_to_cpu(cfgtew->u.cfgte64->res_flags);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1120  		res->qmodel = IPR_QUEUEING_MODEL64(res);
438b03311108b0 Wayne Boyer    2010-05-10  1121  		res->type = cfgtew->u.cfgte64->res_type;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1122  
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1123  		memcpy(res->res_path, &cfgtew->u.cfgte64->res_path,
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1124  			sizeof(res->res_path));
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1125  
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1126  		res->bus = 0;
0cb992eda1f7e7 Wayne Boyer    2010-11-04  1127  		memcpy(&res->dev_lun.scsi_lun, &cfgtew->u.cfgte64->lun,
0cb992eda1f7e7 Wayne Boyer    2010-11-04  1128  			sizeof(res->dev_lun.scsi_lun));
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1129  		res->lun = scsilun_to_int(&res->dev_lun);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1130  
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1131  		if (res->type == IPR_RES_TYPE_GENERIC_SCSI) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1132  			list_for_each_entry(gscsi_res, &ioa_cfg->used_res_q, queue) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1133  				if (gscsi_res->dev_id == cfgtew->u.cfgte64->dev_id) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1134  					found = 1;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1135  					res->target = gscsi_res->target;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1136  					break;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1137  				}
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1138  			}
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1139  			if (!found) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1140  				res->target = find_first_zero_bit(ioa_cfg->target_ids,
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1141  								  ioa_cfg->max_devs_supported);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1142  				set_bit(res->target, ioa_cfg->target_ids);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1143  			}
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1144  		} else if (res->type == IPR_RES_TYPE_IOAFP) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1145  			res->bus = IPR_IOAFP_VIRTUAL_BUS;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1146  			res->target = 0;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1147  		} else if (res->type == IPR_RES_TYPE_ARRAY) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1148  			res->bus = IPR_ARRAY_VIRTUAL_BUS;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1149  			res->target = find_first_zero_bit(ioa_cfg->array_ids,
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1150  							  ioa_cfg->max_devs_supported);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1151  			set_bit(res->target, ioa_cfg->array_ids);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1152  		} else if (res->type == IPR_RES_TYPE_VOLUME_SET) {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1153  			res->bus = IPR_VSET_VIRTUAL_BUS;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1154  			res->target = find_first_zero_bit(ioa_cfg->vset_ids,
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1155  							  ioa_cfg->max_devs_supported);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1156  			set_bit(res->target, ioa_cfg->vset_ids);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1157  		} else {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1158  			res->target = find_first_zero_bit(ioa_cfg->target_ids,
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1159  							  ioa_cfg->max_devs_supported);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1160  			set_bit(res->target, ioa_cfg->target_ids);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1161  		}
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1162  	} else {
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1163  		proto = cfgtew->u.cfgte->proto;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1164  		res->qmodel = IPR_QUEUEING_MODEL(res);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1165  		res->flags = cfgtew->u.cfgte->flags;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1166  		if (res->flags & IPR_IS_IOA_RESOURCE)
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1167  			res->type = IPR_RES_TYPE_IOAFP;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1168  		else
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1169  			res->type = cfgtew->u.cfgte->rsvd_subtype & 0x0f;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1170  
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1171  		res->bus = cfgtew->u.cfgte->res_addr.bus;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1172  		res->target = cfgtew->u.cfgte->res_addr.target;
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1173  		res->lun = cfgtew->u.cfgte->res_addr.lun;
46d7456324766c Wayne Boyer    2010-08-11  1174  		res->lun_wwn = get_unaligned_be64(cfgtew->u.cfgte->lun_wwn);
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1175  	}
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1176  }
3e7ebdfa58ddae Wayne Boyer    2010-02-19  1177  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux